mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
well we suck! how could something seemingly simple be fubar'ed so much! KISS says revert this catastrofeeeee befroe anyone realises
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16794 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
58ee0fbd69
commit
0158336ead
3 changed files with 6 additions and 5 deletions
|
|
@ -68,6 +68,7 @@ static int reset_settings(void)
|
||||||
switch(gui_syncyesno_run(&message, &yes_message, &no_message))
|
switch(gui_syncyesno_run(&message, &yes_message, &no_message))
|
||||||
{
|
{
|
||||||
case YESNO_YES:
|
case YESNO_YES:
|
||||||
|
settings_write_config(CONFIGFILE ".bak", SETTINGS_SAVE_CHANGED);
|
||||||
settings_reset();
|
settings_reset();
|
||||||
settings_apply(true);
|
settings_apply(true);
|
||||||
settings_save();
|
settings_save();
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,6 @@ static bool cfg_string_to_int(int setting_id, int* out, char* str)
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
static bool settings_write_config(char* filename, int options);
|
|
||||||
|
|
||||||
bool settings_load_config(const char* file, bool apply)
|
bool settings_load_config(const char* file, bool apply)
|
||||||
{
|
{
|
||||||
|
|
@ -274,8 +273,7 @@ bool settings_load_config(const char* file, bool apply)
|
||||||
fd = open(file, O_RDONLY);
|
fd = open(file, O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return false;
|
return false;
|
||||||
settings_write_config(ROCKBOX_DIR "oldcfg.cfg", SETTINGS_SAVE_CHANGED);
|
|
||||||
|
|
||||||
while (read_line(fd, line, sizeof line) > 0)
|
while (read_line(fd, line, sizeof line) > 0)
|
||||||
{
|
{
|
||||||
if (!settings_parseline(line, &name, &value))
|
if (!settings_parseline(line, &name, &value))
|
||||||
|
|
@ -452,7 +450,7 @@ static bool is_changed(int setting_id)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool settings_write_config(char* filename, int options)
|
bool settings_write_config(char* filename, int options)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
@ -951,7 +949,7 @@ void settings_reset(void) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
DEBUGF( "settings_reset()\n" );
|
DEBUGF( "settings_reset()\n" );
|
||||||
settings_write_config(ROCKBOX_DIR "oldcfg.cfg", SETTINGS_SAVE_CHANGED);
|
|
||||||
for(i=0; i<nb_settings; i++)
|
for(i=0; i<nb_settings; i++)
|
||||||
{
|
{
|
||||||
switch (settings[i].flags&F_T_MASK)
|
switch (settings[i].flags&F_T_MASK)
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,7 @@ bool settings_load_config(const char* file, bool apply);
|
||||||
|
|
||||||
void status_save( void );
|
void status_save( void );
|
||||||
int settings_save(void);
|
int settings_save(void);
|
||||||
|
|
||||||
/* defines for the options paramater */
|
/* defines for the options paramater */
|
||||||
enum {
|
enum {
|
||||||
SETTINGS_SAVE_CHANGED = 0,
|
SETTINGS_SAVE_CHANGED = 0,
|
||||||
|
|
@ -214,6 +215,7 @@ enum {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
bool settings_save_config(int options);
|
bool settings_save_config(int options);
|
||||||
|
bool settings_write_config(char* filename, int options);
|
||||||
|
|
||||||
void settings_reset(void);
|
void settings_reset(void);
|
||||||
void sound_settings_apply(void);
|
void sound_settings_apply(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue