10000 Merge pull request #7829 from FoamyGuy/multi_display_group_in_use · tannewt/circuitpython@34a525a · GitHub
[go: up one dir, main page]

Skip to content

Commit 34a525a

Browse files
authored
Merge pull request micropython#7829 from FoamyGuy/multi_display_group_in_use
only add circuitpython_splash to display if it's not in another group
2 parents 4380b6d + 8bf94d0 commit 34a525a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

shared-module/displayio/Display.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
136136

137137
// Set the group after initialization otherwise we may send pixels while we delay in
138138
// initialization.
139-
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
139+
if (!circuitpython_splash.in_group) {
140+
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
141+
}
140142
common_hal_displayio_display_set_auto_refresh(self, auto_refresh);
141143
}
142144

@@ -437,7 +439,9 @@ void reset_display(displayio_display_obj_t *self) {
437439
circuitpython_splash.x = 0; // reset position in case someone moved it.
438440
circuitpython_splash.y = 0;
439441
supervisor_start_terminal(self->core.width, self->core.height);
440-
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
442+
if (!circuitpython_splash.in_group) {
443+
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
444+
}
441445
}
442446

443447
void displayio_display_collect_ptrs(displayio_display_obj_t *self) {

0 commit comments

Comments
 (0)
0