fbdev: Support of TrueColor and Directcolor of video hardware
backend check the type of the framebuffer and accept DirectColor and TrueColor
I use a "switch case" to implement other cases in the future.
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index 7a6f255..3338b01 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -240,8 +240,15 @@
return 0;
/* We only handle true-colour frame buffers at the moment. */
- if (finfo->visual != FB_VISUAL_TRUECOLOR || vinfo->grayscale != 0)
- return 0;
+ switch(finfo->visual) {
+ case FB_VISUAL_TRUECOLOR:
+ case FB_VISUAL_DIRECTCOLOR:
+ if (vinfo->grayscale != 0)
+ return 0;
+ break;
+ default:
+ return 0;
+ }
/* We only support formats with MSBs on the left. */
if (vinfo->red.msb_right != 0 || vinfo->green.msb_right != 0 ||