framebufferio: handle sharp memory displays
A bit of cheating; we need to add a protocol getter for reverse_bytes_in_word
This commit is contained in:
parent
a84cc19499
commit
8021f3b4cb
@ -51,7 +51,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
|
|||||||
|
|
||||||
uint16_t ram_width = 0x100;
|
uint16_t ram_width = 0x100;
|
||||||
uint16_t ram_height = 0x100;
|
uint16_t ram_height = 0x100;
|
||||||
|
uint16_t depth = self->framebuffer_protocol->get_color_depth(self->framebuffer);
|
||||||
displayio_display_core_construct(
|
displayio_display_core_construct(
|
||||||
&self->core,
|
&self->core,
|
||||||
NULL,
|
NULL,
|
||||||
@ -62,12 +62,13 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
rotation,
|
rotation,
|
||||||
self->framebuffer_protocol->get_color_depth(self->framebuffer),
|
depth,
|
||||||
false,
|
(depth < 12), // grayscale
|
||||||
false,
|
true, // pixels_in_byte_share_row
|
||||||
self->framebuffer_protocol->get_bytes_per_cell(self->framebuffer),
|
self->framebuffer_protocol->get_bytes_per_cell(self->framebuffer),
|
||||||
false,
|
true, // reverse_pixels_in_byte
|
||||||
false);
|
false // reverse_bytes_in_word
|
||||||
|
);
|
||||||
|
|
||||||
self->first_manual_refresh = !auto_refresh;
|
self->first_manual_refresh = !auto_refresh;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user