From d94c7d3f7679789cce916d213b39f3b54dc0216b Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Thu, 1 Mar 2007 10:56:03 +0000 Subject: [PATCH] Don't display 'Cancelled' splash screen if setting not changed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12527 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/settings.c b/apps/settings.c index cc5ab12d6f..a420e46281 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -1151,10 +1151,22 @@ static bool do_set_setting(const unsigned char* string, void *variable, } else if (action == ACTION_STD_CANCEL) { - gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); if (cb_data->type == INT) - *(int*)variable = oldvalue; - else *(bool*)variable = (bool)oldvalue; + { + if (*(int*)variable != oldvalue) + { + gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); + *(int*)variable = oldvalue; + } + } + else + { + if (*(bool*)variable != (bool)oldvalue) + { + gui_syncsplash(HZ/2,true,str(LANG_MENU_SETTING_CANCEL)); + *(bool*)variable = (bool)oldvalue; + } + } done = true; } else if (action == ACTION_STD_OK)