diff --git a/apps/settings.c b/apps/settings.c index dcc3c8d9d2..302ea58aec 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -259,19 +259,11 @@ static int hex_to_rgb(const char* hex) return 0; } #endif -#define MAX_PERSISTENT_VARS 8 -struct persistent_vars { - char setting[MAX_FILENAME]; - char value[MAX_FILENAME]; -}; -static struct persistent_vars persistent_vars[MAX_PERSISTENT_VARS]; -static int persistent_vars_count = 0; + bool settings_write_config(char* filename) { int i; int fd; - bool check_persistent = !strcmp(filename, CONFIGFILE) && - persistent_vars_count; char value[MAX_PATH]; fd = open(filename,O_CREAT|O_TRUNC|O_WRONLY); if (fd < 0) @@ -282,23 +274,6 @@ bool settings_write_config(char* filename) { if (settings[i].cfg_name == NULL) continue; - if (check_persistent) - { - int j; - bool found = false; - for(j=0; jsetting)) - { - if (j+1 == persistent_vars_count) - { - /* simple case, just decrement - persistent_vars_count */ - persistent_vars_count--; - } - /*else move the last persistent var to here */ - else - { - strcpy(p_var->setting, p_var_last->setting); - strcpy(p_var->value, p_var_last->value); - persistent_vars_count--; - } - break; - } - } - } switch (settings[i].flags&F_T_MASK) { case F_T_INT: diff --git a/apps/settings.h b/apps/settings.h index 8a495a0fee..7d30dfa5d7 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -57,6 +57,7 @@ #define FMPRESET_PATH ROCKBOX_DIR "/fmpresets" #define CONFIGFILE ROCKBOX_DIR "/config.cfg" +#define FIXEDSETTINGSFILE ROCKBOX_DIR "/fixed.cfg" #define MAX_FILENAME 20