summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_backdrops.c
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 /apps/gui/skin_engine/skin_backdrops.c
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
Diffstat (limited to 'apps/gui/skin_engine/skin_backdrops.c')
-rw-r--r--apps/gui/skin_engine/skin_backdrops.c4
1 files changed, 2 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)
178 if (backdrops[i].buflib_handle > 0) 178 if (backdrops[i].buflib_handle > 0)
179 { 179 {
180 backdrops[i].buffer = core_get_data(backdrops[i].buflib_handle); 180 backdrops[i].buffer = core_get_data(backdrops[i].buflib_handle);
181 handle_being_loaded = backdrops[i].buflib_handle;
182 if (strcmp(filename, BACKDROP_BUFFERNAME)) 181 if (strcmp(filename, BACKDROP_BUFFERNAME))
183 { 182 {
183 handle_being_loaded = backdrops[i].buflib_handle;
184 backdrops[i].loaded = 184 backdrops[i].loaded =
185 screens[screen].backdrop_load(filename, backdrops[i].buffer); 185 screens[screen].backdrop_load(filename, backdrops[i].buffer);
186 handle_being_loaded = -1;
187 if (!backdrops[i].loaded) 186 if (!backdrops[i].loaded)
188 { 187 {
189 core_free(backdrops[i].buflib_handle); 188 core_free(backdrops[i].buflib_handle);
190 backdrops[i].buflib_handle = -1; 189 backdrops[i].buflib_handle = -1;
191 retval = false; 190 retval = false;
192 } 191 }
192 handle_being_loaded = -1;
193 } 193 }
194 else 194 else
195 backdrops[i].loaded = true; 195 backdrops[i].loaded = true;