File tree Expand file tree Collapse file tree
shared-module/framebufferio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
5151
5252 uint16_t ram_width = 0x100 ;
5353 uint16_t ram_height = 0x100 ;
54-
54+ uint16_t depth = self -> framebuffer_protocol -> get_color_depth ( self -> framebuffer );
5555 displayio_display_core_construct (
5656 & self -> core ,
5757 NULL ,
@@ -62,12 +62,13 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
6262 0 ,
6363 0 ,
6464 rotation ,
65- self -> framebuffer_protocol -> get_color_depth ( self -> framebuffer ) ,
66- false,
67- false,
65+ depth ,
66+ ( depth < 12 ), // grayscale
67+ true, // pixels_in_byte_share_row
6868 self -> framebuffer_protocol -> get_bytes_per_cell (self -> framebuffer ),
69- false,
70- false);
69+ true, // reverse_pixels_in_byte
70+ false // reverse_bytes_in_word
71+ );
7172
7273 self -> first_manual_refresh = !auto_refresh ;
7374
You can’t perform that action at this time.
0 commit comments