diff options
| author | Dan Halbert <halbert@halwitz.org> | 2021-01-10 13:52:47 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2021-01-10 13:52:47 -0500 |
| commit | ce59b543615c502b60fb1c81735ef0a244975678 (patch) | |
| tree | 6dcb40faa1d20cd23d2118d674af5fb05e4a1b20 /shared-module/framebufferio | |
| parent | e1a843878e4272334869b1db4a8222ae344f5cb8 (diff) | |
| parent | 55c80754c76a115e2f128931a408e6702aee6ef4 (diff) | |
Merge remote-tracking branch 'adafruit/main' into robots.txt
Diffstat (limited to 'shared-module/framebufferio')
| -rw-r--r-- | shared-module/framebufferio/FramebufferDisplay.c | 12 | ||||
| -rw-r--r-- | shared-module/framebufferio/FramebufferDisplay.h | 1 |
2 files changed, 8 insertions, 5 deletions
diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 6b5346877..03e121c91 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -66,7 +66,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu ram_height, 0, 0, - rotation, + 0, // rotation depth, fb_getter_default(get_grayscale, (depth < 8)), fb_getter_default(get_pixels_in_byte_share_row, false), @@ -92,7 +92,9 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu self->native_frames_per_second = fb_getter_default(get_native_frames_per_second, 60); self->native_ms_per_frame = 1000 / self->native_frames_per_second; - supervisor_start_terminal(self->core.width, self->core.height); + if (rotation != 0) { + common_hal_framebufferio_framebufferdisplay_set_rotation(self, rotation); + } // Set the group after initialization otherwise we may send pixels while we delay in // initialization. @@ -278,8 +280,10 @@ void common_hal_framebufferio_framebufferdisplay_set_rotation(framebufferio_fram self->core.height = tmp; } displayio_display_core_set_rotation(&self->core, rotation); - supervisor_stop_terminal(); - supervisor_start_terminal(self->core.width, self->core.height); + if (self == &displays[0].framebuffer_display) { + supervisor_stop_terminal(); + supervisor_start_terminal(self->core.width, self->core.height); + } if (self->core.current_group != NULL) { displayio_group_update_transform(self->core.current_group, &self->core.transform); } diff --git a/shared-module/framebufferio/FramebufferDisplay.h b/shared-module/framebufferio/FramebufferDisplay.h index 89df0d27c..d73d4b9a9 100644 --- a/shared-module/framebufferio/FramebufferDisplay.h +++ b/shared-module/framebufferio/FramebufferDisplay.h @@ -33,7 +33,6 @@ #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/displayio/Group.h" -#include "shared-bindings/pulseio/PWMOut.h" #include "shared-module/displayio/area.h" #include "shared-module/displayio/display_core.h" |
