diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-03-25 10:28:37 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-03-25 10:28:37 +0000 |
| commit | 9ed5a67b698061d79554ad91b9a8b77a49092261 (patch) | |
| tree | a3ee1c85cc9f8318fe6c85958de357791a6558d0 | |
| parent | 27cf67733936abd75fcb1f8da765977cd75906ee (diff) | |
| download | rockbox-9ed5a67b698061d79554ad91b9a8b77a49092261.zip rockbox-9ed5a67b698061d79554ad91b9a8b77a49092261.tar.gz rockbox-9ed5a67b698061d79554ad91b9a8b77a49092261.tar.bz2 rockbox-9ed5a67b698061d79554ad91b9a8b77a49092261.tar.xz | |
write the current settings to .rockbox/config.cfg.bak before resetting settings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16792 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/menus/main_menu.c | 1 | ||||
| -rw-r--r-- | apps/settings.c | 2 | ||||
| -rw-r--r-- | apps/settings.h | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 7c2e87c..d756d98 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -68,6 +68,7 @@ static int reset_settings(void) switch(gui_syncyesno_run(&message, &yes_message, &no_message)) { case YESNO_YES: + settings_write_config(CONFIGFILE ".bak", SETTINGS_SAVE_CHANGED); settings_reset(); settings_apply(true); settings_save(); diff --git a/apps/settings.c b/apps/settings.c index 449a38b..237ff1c 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -450,7 +450,7 @@ static bool is_changed(int setting_id) return true; } -static bool settings_write_config(char* filename, int options) +bool settings_write_config(char* filename, int options) { int i; int fd; diff --git a/apps/settings.h b/apps/settings.h index 1a2c2ee..9f7546c 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -200,6 +200,7 @@ bool settings_load_config(const char* file, bool apply); void status_save( void ); int settings_save(void); + /* defines for the options paramater */ enum { SETTINGS_SAVE_CHANGED = 0, @@ -214,6 +215,7 @@ enum { #endif }; bool settings_save_config(int options); +bool settings_write_config(char* filename, int options); void settings_reset(void); void sound_settings_apply(void); |