diff options
| author | Steve Bavin <pondlife@pondlife.me> | 2007-03-01 10:56:03 +0000 |
|---|---|---|
| committer | Steve Bavin <pondlife@pondlife.me> | 2007-03-01 10:56:03 +0000 |
| commit | d94c7d3f7679789cce916d213b39f3b54dc0216b (patch) | |
| tree | bef58538b75728602d703dd6c5ce8cff9bf0c298 | |
| parent | 509a96dd5141dbb9edeadf4480d8aa632b563a27 (diff) | |
| download | rockbox-d94c7d3f7679789cce916d213b39f3b54dc0216b.zip rockbox-d94c7d3f7679789cce916d213b39f3b54dc0216b.tar.gz rockbox-d94c7d3f7679789cce916d213b39f3b54dc0216b.tar.bz2 rockbox-d94c7d3f7679789cce916d213b39f3b54dc0216b.tar.xz | |
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
| -rw-r--r-- | apps/settings.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c index cc5ab12..a420e46 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) |