aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@embedded.pro>2016-08-24 00:14:25 +0200
committerJoel Bodenmann <joel@embedded.pro>2016-08-24 00:14:25 +0200
commit16ac227a75e5cce29b691477da4e995c69cf97d9 (patch)
treed74f2e8593222118c46d35c54f42949b5cb9db0d /boards
parentac5e96cca18884727b165f4245e42887ef0e3a21 (diff)
downloaduGFX-16ac227a75e5cce29b691477da4e995c69cf97d9.tar.gz
uGFX-16ac227a75e5cce29b691477da4e995c69cf97d9.tar.bz2
uGFX-16ac227a75e5cce29b691477da4e995c69cf97d9.zip
Fixing issue with color formats in Linux-Framebuffer board files
Diffstat (limited to 'boards')
-rw-r--r--boards/base/Linux-Framebuffer/board_framebuffer.h5
1 files changed, 3 insertions, 2 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);
}