You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.1 KiB

  1. Index: serdisplib-2.01/src/serdisp_specific_framebuffer.c
  2. ===================================================================
  3. --- serdisplib-2.01.orig/src/serdisp_specific_framebuffer.c
  4. +++ serdisplib-2.01/src/serdisp_specific_framebuffer.c
  5. @@ -306,13 +306,15 @@ serdisp_t* serdisp_framebuffer_setup(con
  6. if (fb_success) {
  7. /* check if colour mode is supported */
  8. - if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
  9. + if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
  10. sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel);
  11. fb_success = 0;
  12. }
  13. }
  14. -
  15. - dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
  16. + if (vinfo.bits_per_pixel == 1)
  17. + dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8;
  18. + else
  19. + dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
  20. if (fb_success) {
  21. /* map framebuffer device to memory */