remove extra function call. handle show(None) for framebuffer and epaper

This commit is contained in:
foamyguy 2022-12-01 17:25:36 -06:00
parent 1bbdc820c0
commit 42f1d50acc
3 changed files with 7 additions and 1 deletions

View File

@ -142,7 +142,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) {
if (root_group == NULL) {
return displayio_display_core_set_root_group(&self->core, &circuitpython_splash);
root_group = &circuitpython_splash;
}
return displayio_display_core_set_root_group(&self->core, root_group);
}

View File

@ -103,6 +103,9 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t
}
bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group) {
if (root_group == NULL) {
root_group = &circuitpython_splash;
}
return displayio_display_core_set_root_group(&self->core, root_group);
}

View File

@ -102,6 +102,9 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
}
bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t *self, displayio_group_t *root_group) {
if (root_group == NULL) {
root_group = &circuitpython_splash;
}
return displayio_display_core_set_root_group(&self->core, root_group);
}