From 08181c7ce6b244d35f8c69206267a0c329d2c20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Tue, 8 Oct 2002 09:40:05 +0000 Subject: [PATCH] Renamed .eq files .cfg git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2521 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 21 ++++++++++----------- apps/settings.h | 2 +- apps/tree.c | 12 ++++++------ 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/apps/settings.c b/apps/settings.c index 92bf5f405a..067cc3eae4 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -541,7 +541,7 @@ static bool settings_parseline(char* line, char** name, char** value) return true; } -static void set_eq_sound(char* value, int type, int* setting) +static void set_sound(char* value, int type, int* setting) { int num = atoi(value); @@ -557,7 +557,7 @@ static void set_eq_sound(char* value, int type, int* setting) mpeg_sound_set(type, num); } -bool settings_load_eq(char* file) +bool settings_load_config(char* file) { int fd; char line[128]; @@ -575,23 +575,22 @@ bool settings_load_eq(char* file) continue; if (!strcasecmp(name, "volume")) - set_eq_sound(value, SOUND_VOLUME, &global_settings.volume); + set_sound(value, SOUND_VOLUME, &global_settings.volume); else if (!strcasecmp(name, "bass")) - set_eq_sound(value, SOUND_BASS, &global_settings.bass); + set_sound(value, SOUND_BASS, &global_settings.bass); else if (!strcasecmp(name, "treble")) - set_eq_sound(value, SOUND_TREBLE, &global_settings.treble); + set_sound(value, SOUND_TREBLE, &global_settings.treble); else if (!strcasecmp(name, "balance")) - set_eq_sound(value, SOUND_BALANCE, &global_settings.balance); + set_sound(value, SOUND_BALANCE, &global_settings.balance); else if (!strcasecmp(name, "channels")) - set_eq_sound(value, SOUND_CHANNELS, - &global_settings.channel_config); + set_sound(value, SOUND_CHANNELS, &global_settings.channel_config); #ifdef HAVE_MAS3587F else if (!strcasecmp(name, "loudness")) - set_eq_sound(value, SOUND_LOUDNESS, &global_settings.loudness); + set_sound(value, SOUND_LOUDNESS, &global_settings.loudness); else if (!strcasecmp(name, "bass boost")) - set_eq_sound(value, SOUND_SUPERBASS, &global_settings.bass_boost); + set_sound(value, SOUND_SUPERBASS, &global_settings.bass_boost); else if (!strcasecmp(name, "auto volume")) - set_eq_sound(value, SOUND_AVC, &global_settings.avc); + set_sound(value, SOUND_AVC, &global_settings.avc); #endif } diff --git a/apps/settings.h b/apps/settings.h index d64d00e8cf..f5609fe75c 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -114,7 +114,7 @@ void settings_reset(void); void settings_apply(void); void settings_display(void); -bool settings_load_eq(char* file); +bool settings_load_config(char* file); bool set_bool_options(char* string, bool* variable, char* yes_str, char* no_str ); diff --git a/apps/tree.c b/apps/tree.c index f4a49a9dce..4eeec4098d 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -141,7 +141,7 @@ extern unsigned char bitmap_icons_6x8[LastIcon][6]; #define TREE_ATTR_M3U 0x80 /* playlist */ #define TREE_ATTR_WPS 0x100 /* wps config file */ #define TREE_ATTR_MOD 0x200 /* firmware file */ -#define TREE_ATTR_EQ 0x400 /* EQ config file */ +#define TREE_ATTR_CFG 0x400 /* config file */ #define TREE_ATTR_TXT 0x500 /* text file */ #define TREE_ATTR_FONT 0x800 /* font file */ #define TREE_ATTR_LNG 0x1000 /* binary lang file */ @@ -256,8 +256,8 @@ static int showdir(char *path, int start) dptr->attr |= TREE_ATTR_MPA; else if (!strcasecmp(&entry->d_name[len-4], ".m3u")) dptr->attr |= TREE_ATTR_M3U; - else if (!strcasecmp(&entry->d_name[len-3], ".eq")) - dptr->attr |= TREE_ATTR_EQ; + else if (!strcasecmp(&entry->d_name[len-3], ".cfg")) + dptr->attr |= TREE_ATTR_CFG; else if (!strcasecmp(&entry->d_name[len-4], ".wps")) dptr->attr |= TREE_ATTR_WPS; else if (!strcasecmp(&entry->d_name[len-4], ".txt")) @@ -383,7 +383,7 @@ static int showdir(char *path, int start) icon_type = Wps; break; - case TREE_ATTR_EQ: + case TREE_ATTR_CFG: icon_type = Wps; break; @@ -806,10 +806,10 @@ bool dirbrowse(char *root) restore = true; break; - case TREE_ATTR_EQ: + case TREE_ATTR_CFG: snprintf(buf, sizeof buf, "%s/%s", currdir, file->name); - settings_load_eq(buf); + settings_load_config(buf); restore = true; break;