Skip to content

Commit

Permalink
Merge pull request #7829 from FoamyGuy/multi_display_group_in_use
Browse files Browse the repository at this point in the history
only add circuitpython_splash to display if it's not in another group
  • Loading branch information
tannewt authored Apr 5, 2023
2 parents 4380b6d + 8bf94d0 commit 34a525a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shared-module/displayio/Display.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,

// Set the group after initialization otherwise we may send pixels while we delay in
// initialization.
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
if (!circuitpython_splash.in_group) {
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
}
common_hal_displayio_display_set_auto_refresh(self, auto_refresh);
}

Expand Down Expand Up @@ -437,7 +439,9 @@ void reset_display(displayio_display_obj_t *self) {
circuitpython_splash.x = 0; // reset position in case someone moved it.
circuitpython_splash.y = 0;
supervisor_start_terminal(self->core.width, self->core.height);
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
if (!circuitpython_splash.in_group) {
common_hal_displayio_display_set_root_group(self, &circuitpython_splash);
}
}

void displayio_display_collect_ptrs(displayio_display_obj_t *self) {
Expand Down

0 comments on commit 34a525a

Please sign in to comment.