Fixing issue with color formats in Linux-Framebuffer board files

spinbox_widget
Joel Bodenmann 2016-08-24 00:14:25 +02:00
parent ac5e96cca1
commit 16ac227a75
2 changed files with 4 additions and 3 deletions

View File

@ -96,7 +96,8 @@
fb_var.reserved[2] = 0;
fb_var.xoffset = 0;
fb_var.yoffset = 0;
fb_var.bits_per_pixel = LLDCOLOR_BITS;
fb_var.bits_per_pixel = sizeof(LLD_COLORTYPE)*8;
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) {
fprintf(stderr, "GDISP Framebuffer: Failed to set video mode\n");
@ -113,7 +114,7 @@
fprintf(stderr, "GDISP Framebuffer: The display is not in TRUECOLOR mode\n");
exit(-1);
}
if (fb_var.bits_per_pixel != LLDCOLOR_TYPE_BITS) {
if (fb_var.bits_per_pixel != sizeof(LLD_COLORTYPE)*8) {
fprintf(stderr, "GDISP Framebuffer: The display is %u not %u bits per pixel\n", fb_var.bits_per_pixel, LLDCOLOR_TYPE_BITS);
exit(-1);
}

View File

@ -12,7 +12,7 @@ FEATURE: Added SDL driver
FEATURE: Added ILI9225 driver
FEATURE: Added ST7735 driver
FEATURE: Added Linux event input driver
FIX: Fixed an issue with color formats in Linux-Framebuffer board files
*** Release 2.6 ***
FIX: Fixed bug where the list item count wasn't decremented when an item was removed