From 16ac227a75e5cce29b691477da4e995c69cf97d9 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Wed, 24 Aug 2016 00:14:25 +0200 Subject: [PATCH] Fixing issue with color formats in Linux-Framebuffer board files --- boards/base/Linux-Framebuffer/board_framebuffer.h | 5 +++-- docs/releases.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/boards/base/Linux-Framebuffer/board_framebuffer.h b/boards/base/Linux-Framebuffer/board_framebuffer.h index 9b760e08..8747d87e 100644 --- a/boards/base/Linux-Framebuffer/board_framebuffer.h +++ b/boards/base/Linux-Framebuffer/board_framebuffer.h @@ -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); } diff --git a/docs/releases.txt b/docs/releases.txt index 14e1051b..91c9a032 100644 --- a/docs/releases.txt +++ b/docs/releases.txt @@ -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