summaryrefslogtreecommitdiff
path: root/apps/menus/theme_menu.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-10-08 13:07:20 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-10-08 13:07:20 +0000
commit09d897508454adb6471c5dbc74057c282bfe8446 (patch)
treef3ce0e803e6567cb9c5e633ff654ffc19630c0ed /apps/menus/theme_menu.c
parent6bd9a31b0b7cf15dbf4d787c4b112ff93e80a55f (diff)
don't reload the skins if color isn't actually changed.
reload skins when colors are reset. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28219 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/theme_menu.c')
-rw-r--r--apps/menus/theme_menu.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c
index 1676719123..66274e2e18 100644
--- a/apps/menus/theme_menu.c
+++ b/apps/menus/theme_menu.c
@@ -86,19 +86,22 @@ static struct colour_info
*/
static int set_color_func(void* color)
{
- int res, c = (intptr_t)color, banned_color=-1;
-
+ int res, c = (intptr_t)color, banned_color=-1, old_color;
/* Don't let foreground be set the same as background and vice-versa */
if (c == COLOR_BG)
banned_color = *colors[COLOR_FG].setting;
else if (c == COLOR_FG)
banned_color = *colors[COLOR_BG].setting;
+ old_color = *colors[c].setting;
res = (int)set_color(&screens[SCREEN_MAIN],str(colors[c].lang_id),
colors[c].setting, banned_color);
- settings_save();
- settings_apply(false);
- settings_apply_skins();
+ if (old_color != *colors[c].setting)
+ {
+ settings_save();
+ settings_apply(false);
+ settings_apply_skins();
+ }
return res;
}
@@ -112,6 +115,7 @@ static int reset_color(void)
settings_save();
settings_apply(false);
+ settings_apply_skins();
return 0;
}
MENUITEM_FUNCTION(set_bg_col, MENU_FUNC_USEPARAM, ID2P(LANG_BACKGROUND_COLOR),