Be less smart about when to reload skins as it caused more problems than it was worth. If any theme setting is loading from a .cfg reload all skins. Fixes FS#12410

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31081 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2011-11-28 10:58:15 +00:00
parent 25bce232f2
commit d66592bad1
2 changed files with 14 additions and 19 deletions

View file

@ -139,16 +139,8 @@ void settings_apply_skins(void)
{
FOR_NB_SCREENS(j)
{
bool load = false;
get_skin_filename(filename, MAX_PATH, i,j);
if (filename[0] && (strcmp(filename, skins[i][j].filename) || skins[i][j].failsafe_loaded))
load = true;
else if (first_run || (!filename[0] && !skins[i][j].failsafe_loaded))
load = true;
if (load)
{
if (!first_run)
{
skin_data_free_buflib_allocs(&skins[i][j].data);
@ -163,7 +155,6 @@ void settings_apply_skins(void)
skin_get_gwps(i, j);
}
}
}
first_run = false;
viewportmanager_theme_changed(THEME_STATUSBAR);
#ifdef HAVE_BACKDROP_IMAGE

View file

@ -268,6 +268,7 @@ bool settings_load_config(const char* file, bool apply)
char* name;
char* value;
int i;
bool theme_changed = false;
fd = open_utf8(file, O_RDONLY);
if (fd < 0)
return false;
@ -282,6 +283,8 @@ bool settings_load_config(const char* file, bool apply)
continue;
if (!strcasecmp(name,settings[i].cfg_name))
{
if (settings[i].flags&F_THEMESETTING)
theme_changed = true;
switch (settings[i].flags&F_T_MASK)
{
case F_T_CUSTOM:
@ -363,6 +366,7 @@ bool settings_load_config(const char* file, bool apply)
{
settings_save();
settings_apply(true);
if (theme_changed)
settings_apply_skins();
}
return true;