summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-08 09:40:05 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-08 09:40:05 +0000
commit08181c7ce6b244d35f8c69206267a0c329d2c20c (patch)
treec7fe4b5ffe4e386a37fbf6b5d73888f94e52f196 /apps
parent6ce6d468ddda5f83929f3e069493babd8dedd3e0 (diff)
downloadrockbox-08181c7ce6b244d35f8c69206267a0c329d2c20c.tar.gz
rockbox-08181c7ce6b244d35f8c69206267a0c329d2c20c.zip
Renamed .eq files .cfg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2521 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c21
-rw-r--r--apps/settings.h2
-rw-r--r--apps/tree.c12
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)
541 return true; 541 return true;
542} 542}
543 543
544static void set_eq_sound(char* value, int type, int* setting) 544static void set_sound(char* value, int type, int* setting)
545{ 545{
546 int num = atoi(value); 546 int num = atoi(value);
547 547
@@ -557,7 +557,7 @@ static void set_eq_sound(char* value, int type, int* setting)
557 mpeg_sound_set(type, num); 557 mpeg_sound_set(type, num);
558} 558}
559 559
560bool settings_load_eq(char* file) 560bool settings_load_config(char* file)
561{ 561{
562 int fd; 562 int fd;
563 char line[128]; 563 char line[128];
@@ -575,23 +575,22 @@ bool settings_load_eq(char* file)
575 continue; 575 continue;
576 576
577 if (!strcasecmp(name, "volume")) 577 if (!strcasecmp(name, "volume"))
578 set_eq_sound(value, SOUND_VOLUME, &global_settings.volume); 578 set_sound(value, SOUND_VOLUME, &global_settings.volume);
579 else if (!strcasecmp(name, "bass")) 579 else if (!strcasecmp(name, "bass"))
580 set_eq_sound(value, SOUND_BASS, &global_settings.bass); 580 set_sound(value, SOUND_BASS, &global_settings.bass);
581 else if (!strcasecmp(name, "treble")) 581 else if (!strcasecmp(name, "treble"))
582 set_eq_sound(value, SOUND_TREBLE, &global_settings.treble); 582 set_sound(value, SOUND_TREBLE, &global_settings.treble);
583 else if (!strcasecmp(name, "balance")) 583 else if (!strcasecmp(name, "balance"))
584 set_eq_sound(value, SOUND_BALANCE, &global_settings.balance); 584 set_sound(value, SOUND_BALANCE, &global_settings.balance);
585 else if (!strcasecmp(name, "channels")) 585 else if (!strcasecmp(name, "channels"))
586 set_eq_sound(value, SOUND_CHANNELS, 586 set_sound(value, SOUND_CHANNELS, &global_settings.channel_config);
587 &global_settings.channel_config);
588#ifdef HAVE_MAS3587F 587#ifdef HAVE_MAS3587F
589 else if (!strcasecmp(name, "loudness")) 588 else if (!strcasecmp(name, "loudness"))
590 set_eq_sound(value, SOUND_LOUDNESS, &global_settings.loudness); 589 set_sound(value, SOUND_LOUDNESS, &global_settings.loudness);
591 else if (!strcasecmp(name, "bass boost")) 590 else if (!strcasecmp(name, "bass boost"))
592 set_eq_sound(value, SOUND_SUPERBASS, &global_settings.bass_boost); 591 set_sound(value, SOUND_SUPERBASS, &global_settings.bass_boost);
593 else if (!strcasecmp(name, "auto volume")) 592 else if (!strcasecmp(name, "auto volume"))
594 set_eq_sound(value, SOUND_AVC, &global_settings.avc); 593 set_sound(value, SOUND_AVC, &global_settings.avc);
595#endif 594#endif
596 } 595 }
597 596
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);
114void settings_apply(void); 114void settings_apply(void);
115void settings_display(void); 115void settings_display(void);
116 116
117bool settings_load_eq(char* file); 117bool settings_load_config(char* file);
118bool set_bool_options(char* string, bool* variable, 118bool set_bool_options(char* string, bool* variable,
119 char* yes_str, char* no_str ); 119 char* yes_str, char* no_str );
120 120
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];
141#define TREE_ATTR_M3U 0x80 /* playlist */ 141#define TREE_ATTR_M3U 0x80 /* playlist */
142#define TREE_ATTR_WPS 0x100 /* wps config file */ 142#define TREE_ATTR_WPS 0x100 /* wps config file */
143#define TREE_ATTR_MOD 0x200 /* firmware file */ 143#define TREE_ATTR_MOD 0x200 /* firmware file */
144#define TREE_ATTR_EQ 0x400 /* EQ config file */ 144#define TREE_ATTR_CFG 0x400 /* config file */
145#define TREE_ATTR_TXT 0x500 /* text file */ 145#define TREE_ATTR_TXT 0x500 /* text file */
146#define TREE_ATTR_FONT 0x800 /* font file */ 146#define TREE_ATTR_FONT 0x800 /* font file */
147#define TREE_ATTR_LNG 0x1000 /* binary lang file */ 147#define TREE_ATTR_LNG 0x1000 /* binary lang file */
@@ -256,8 +256,8 @@ static int showdir(char *path, int start)
256 dptr->attr |= TREE_ATTR_MPA; 256 dptr->attr |= TREE_ATTR_MPA;
257 else if (!strcasecmp(&entry->d_name[len-4], ".m3u")) 257 else if (!strcasecmp(&entry->d_name[len-4], ".m3u"))
258 dptr->attr |= TREE_ATTR_M3U; 258 dptr->attr |= TREE_ATTR_M3U;
259 else if (!strcasecmp(&entry->d_name[len-3], ".eq")) 259 else if (!strcasecmp(&entry->d_name[len-3], ".cfg"))
260 dptr->attr |= TREE_ATTR_EQ; 260 dptr->attr |= TREE_ATTR_CFG;
261 else if (!strcasecmp(&entry->d_name[len-4], ".wps")) 261 else if (!strcasecmp(&entry->d_name[len-4], ".wps"))
262 dptr->attr |= TREE_ATTR_WPS; 262 dptr->attr |= TREE_ATTR_WPS;
263 else if (!strcasecmp(&entry->d_name[len-4], ".txt")) 263 else if (!strcasecmp(&entry->d_name[len-4], ".txt"))
@@ -383,7 +383,7 @@ static int showdir(char *path, int start)
383 icon_type = Wps; 383 icon_type = Wps;
384 break; 384 break;
385 385
386 case TREE_ATTR_EQ: 386 case TREE_ATTR_CFG:
387 icon_type = Wps; 387 icon_type = Wps;
388 break; 388 break;
389 389
@@ -806,10 +806,10 @@ bool dirbrowse(char *root)
806 restore = true; 806 restore = true;
807 break; 807 break;
808 808
809 case TREE_ATTR_EQ: 809 case TREE_ATTR_CFG:
810 snprintf(buf, sizeof buf, "%s/%s", 810 snprintf(buf, sizeof buf, "%s/%s",
811 currdir, file->name); 811 currdir, file->name);
812 settings_load_eq(buf); 812 settings_load_config(buf);
813 restore = true; 813 restore = true;
814 break; 814 break;
815 815