diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-03-25 12:42:47 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-03-25 12:42:47 +0000 |
commit | 0158336eadce5b5c5f9f526ac239c4e988eb02a2 (patch) | |
tree | a3ee1c85cc9f8318fe6c85958de357791a6558d0 /apps/settings.c | |
parent | 58ee0fbd6940cd3a03d027c5e81b7850ef00a960 (diff) |
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
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/settings.c b/apps/settings.c index d259cecd65..237ff1c567 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -262,7 +262,6 @@ static bool cfg_string_to_int(int setting_id, int* out, char* str) } return false; } -static bool settings_write_config(char* filename, int options); 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); if (fd < 0) return false; - settings_write_config(ROCKBOX_DIR "oldcfg.cfg", SETTINGS_SAVE_CHANGED); - + while (read_line(fd, line, sizeof line) > 0) { if (!settings_parseline(line, &name, &value)) @@ -452,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; @@ -951,7 +949,7 @@ void settings_reset(void) { int i; DEBUGF( "settings_reset()\n" ); - settings_write_config(ROCKBOX_DIR "oldcfg.cfg", SETTINGS_SAVE_CHANGED); + for(i=0; i<nb_settings; i++) { switch (settings[i].flags&F_T_MASK) |