Merge pull request #3551 from jepler/displayio-multidisplay-leak
displayio: further ensure just one start_terminal call
This commit is contained in:
commit
2ab1552484
@ -347,8 +347,10 @@ void common_hal_displayio_display_set_rotation(displayio_display_obj_t* self, in
|
||||
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].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);
|
||||
}
|
||||
|
@ -85,7 +85,10 @@ void displayio_display_core_construct(displayio_display_core_t* self,
|
||||
self->bus = bus;
|
||||
|
||||
|
||||
supervisor_start_terminal(width, height);
|
||||
// (offsetof core is equal in all display types)
|
||||
if (self == &displays[0].display.core) {
|
||||
supervisor_start_terminal(width, height);
|
||||
}
|
||||
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
|
@ -280,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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user