Skip to content

Commit 42f1d50

Browse files
committed
remove extra function call. handle show(None) for framebuffer and epaper
1 parent 1bbdc82 commit 42f1d50

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

shared-module/displayio/Display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
142142

143143
bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) {
144144
if (root_group == NULL) {
145-
return displayio_display_core_set_root_group(&self->core, &circuitpython_splash);
145+
root_group = &circuitpython_splash;
146146
}
147147
return displayio_display_core_set_root_group(&self->core, root_group);
148148
}

shared-module/displayio/EPaperDisplay.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t
103103
}
104104

105105
bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group) {
106+
if (root_group == NULL) {
107+
root_group = &circuitpython_splash;
108+
}
106109
return displayio_display_core_set_root_group(&self->core, root_group);
107110
}
108111

shared-module/framebufferio/FramebufferDisplay.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
102102
}
103103

104104
bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t *self, displayio_group_t *root_group) {
105+
if (root_group == NULL) {
106+
root_group = &circuitpython_splash;
107+
}
105108
return displayio_display_core_set_root_group(&self->core, root_group);
106109
}
107110

0 commit comments

Comments
 (0)