summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-10-28 22:55:27 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-28 22:55:27 -0400
commitc5c17fa7995c62267a1695e58841bd17b9fb2099 (patch)
tree006286eed2293005a06ac6477546ed225069beb9 /apps
parentc7fb319151ba60a086c75e8de819315eda57ae55 (diff)
downloadrockbox-c5c17fa7995c62267a1695e58841bd17b9fb2099.tar.gz
rockbox-c5c17fa7995c62267a1695e58841bd17b9fb2099.tar.bz2
rockbox-c5c17fa7995c62267a1695e58841bd17b9fb2099.zip
Fix display regression from c85d8e2
Basically setting a null buffer is valid but it must be selected into a screen to initialize to the default buffer I wrongly assumed screen type wouldn't matter but since I decided to reference backdrops directly to the default buffer (since they are saved as an offset from what it later assumes to be the default framebuffer) SCREEN_MAIN/SCREEN_REMOTE are not longer optional Change-Id: I8a8afbbe1e3ed0bfe6abd40ce287638e9fc6da60
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/skin_engine/skin_backdrops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c
index 20010efa26..41de1e1f76 100644
--- a/apps/gui/skin_engine/skin_backdrops.c
+++ b/apps/gui/skin_engine/skin_backdrops.c
@@ -210,8 +210,15 @@ void skin_backdrop_set_buffer(int backdrop_id, struct skin_viewport *svp)
return;
else if (backdrop_id < 0)
{
- /* SCREEN_MAIN is ok here screen only matters if passed VP is NULL */
- screens[SCREEN_MAIN].viewport_set_buffer(&svp->vp, NULL); /*Default*/
+#if 1
+ /* ensure the current vp has been removed so it has to be reselected */
+ screens[SCREEN_MAIN].set_viewport_ex(NULL, 0);
+# if defined(HAVE_REMOTE_LCD)
+ screens[SCREEN_REMOTE].set_viewport_ex(NULL, 0);
+# endif
+#endif
+ /* WARNING: vp-> buffer is invaid till viewport is set to a screen */
+ svp->vp.buffer = NULL; /*Default*/
return;
}