summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-01-22 16:58:47 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-22 16:58:58 +0100
commit6cb11764e001e8d4d8417c8f5c93e4168d4b3267 (patch)
tree93126658f1ed0316a0c79275d2f8afede3730c10
parent6022d3100a31266d48d89c4eaa562ed58a1f1909 (diff)
downloadrockbox-6cb11764e001e8d4d8417c8f5c93e4168d4b3267.tar.gz
rockbox-6cb11764e001e8d4d8417c8f5c93e4168d4b3267.zip
skin_engine/backdrops: Have to reload default backdrops from setting when it changed.
When skins use the default backdrop (via %X(-) or no %X at all) and the setting changes it needs to be reloaded, otherwise when changing themes the new theme could show the backdrop from the previous theme. The same needs to be done when re-selecting the same theme after USB because the backdrop file was potentially overwritten. Fixes FS#12892 and FS#12942. Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
-rw-r--r--apps/gui/skin_engine/skin_backdrops.c4
-rw-r--r--apps/gui/skin_engine/skin_engine.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c
index 4d0345c21d..8962b5113f 100644
--- a/apps/gui/skin_engine/skin_backdrops.c
+++ b/apps/gui/skin_engine/skin_backdrops.c
@@ -178,18 +178,18 @@ bool skin_backdrops_preload(void)
if (backdrops[i].buflib_handle > 0)
{
backdrops[i].buffer = core_get_data(backdrops[i].buflib_handle);
- handle_being_loaded = backdrops[i].buflib_handle;
if (strcmp(filename, BACKDROP_BUFFERNAME))
{
+ handle_being_loaded = backdrops[i].buflib_handle;
backdrops[i].loaded =
screens[screen].backdrop_load(filename, backdrops[i].buffer);
- handle_being_loaded = -1;
if (!backdrops[i].loaded)
{
core_free(backdrops[i].buflib_handle);
backdrops[i].buflib_handle = -1;
retval = false;
}
+ handle_being_loaded = -1;
}
else
backdrops[i].loaded = true;
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index bf284b7a79..b5178cc798 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -181,6 +181,9 @@ void settings_apply_skins(void)
}
}
first_run = false;
+ /* any backdrop that was loaded with "-" has to be reloaded because
+ * the setting may have changed */
+ skin_backdrop_load_setting();
viewportmanager_theme_changed(THEME_STATUSBAR);
#ifdef HAVE_BACKDROP_IMAGE
FOR_NB_SCREENS(i)