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
This commit is contained in:
Jonathan Gordon 2008-03-25 10:28:37 +00:00
parent 27cf677339
commit 9ed5a67b69
3 changed files with 4 additions and 1 deletions

View file

@ -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();

View file

@ -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;

View file

@ -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);