Fix for linux framebuffer for RGB555 and BGR555

spinbox_widget
inmarket 2016-08-24 17:47:32 +10:00
parent b4f96b3e26
commit bc336ee15f
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@
fb_var.reserved[2] = 0;
fb_var.xoffset = 0;
fb_var.yoffset = 0;
fb_var.bits_per_pixel = sizeof(LLDCOLOR_TYPE)*8;
#if LLDCOLOR_BITS == 15
fb_var.bits_per_pixel = LLDCOLOR_BITS; // Handle RGB555 & BGR555
#else
fb_var.bits_per_pixel = sizeof(LLDCOLOR_TYPE)*8;
#endif
fb_var.grayscale = 0;
fb_var.activate = FB_ACTIVATE_NOW;
if (ioctl(fb, FBIOPUT_VSCREENINFO, &fb_var) == -1 || ioctl (fb, FBIOGET_VSCREENINFO, &fb_var) == -1) {