mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
serdisplib: add package
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
Index: serdisplib-2.01/src/serdisp_specific_framebuffer.c
|
||||
===================================================================
|
||||
--- serdisplib-2.01.orig/src/serdisp_specific_framebuffer.c
|
||||
+++ serdisplib-2.01/src/serdisp_specific_framebuffer.c
|
||||
@@ -306,13 +306,15 @@ serdisp_t* serdisp_framebuffer_setup(con
|
||||
|
||||
if (fb_success) {
|
||||
/* check if colour mode is supported */
|
||||
- if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
|
||||
+ if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
|
||||
sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel);
|
||||
fb_success = 0;
|
||||
}
|
||||
}
|
||||
-
|
||||
- dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
|
||||
+ if (vinfo.bits_per_pixel == 1)
|
||||
+ dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8;
|
||||
+ else
|
||||
+ dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
|
||||
|
||||
if (fb_success) {
|
||||
/* map framebuffer device to memory */
|
||||
Reference in New Issue
Block a user