Renamed .eq files .cfg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2521 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6ce6d468dd
commit
08181c7ce6
3 changed files with 17 additions and 18 deletions
|
@ -541,7 +541,7 @@ static bool settings_parseline(char* line, char** name, char** value)
|
||||||
return true;
|
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);
|
int num = atoi(value);
|
||||||
|
|
||||||
|
@ -557,7 +557,7 @@ static void set_eq_sound(char* value, int type, int* setting)
|
||||||
mpeg_sound_set(type, num);
|
mpeg_sound_set(type, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool settings_load_eq(char* file)
|
bool settings_load_config(char* file)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
char line[128];
|
char line[128];
|
||||||
|
@ -575,23 +575,22 @@ bool settings_load_eq(char* file)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!strcasecmp(name, "volume"))
|
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"))
|
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"))
|
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"))
|
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"))
|
else if (!strcasecmp(name, "channels"))
|
||||||
set_eq_sound(value, SOUND_CHANNELS,
|
set_sound(value, SOUND_CHANNELS, &global_settings.channel_config);
|
||||||
&global_settings.channel_config);
|
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
else if (!strcasecmp(name, "loudness"))
|
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"))
|
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"))
|
else if (!strcasecmp(name, "auto volume"))
|
||||||
set_eq_sound(value, SOUND_AVC, &global_settings.avc);
|
set_sound(value, SOUND_AVC, &global_settings.avc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ void settings_reset(void);
|
||||||
void settings_apply(void);
|
void settings_apply(void);
|
||||||
void settings_display(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,
|
bool set_bool_options(char* string, bool* variable,
|
||||||
char* yes_str, char* no_str );
|
char* yes_str, char* no_str );
|
||||||
|
|
||||||
|
|
12
apps/tree.c
12
apps/tree.c
|
@ -141,7 +141,7 @@ extern unsigned char bitmap_icons_6x8[LastIcon][6];
|
||||||
#define TREE_ATTR_M3U 0x80 /* playlist */
|
#define TREE_ATTR_M3U 0x80 /* playlist */
|
||||||
#define TREE_ATTR_WPS 0x100 /* wps config file */
|
#define TREE_ATTR_WPS 0x100 /* wps config file */
|
||||||
#define TREE_ATTR_MOD 0x200 /* firmware 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_TXT 0x500 /* text file */
|
||||||
#define TREE_ATTR_FONT 0x800 /* font file */
|
#define TREE_ATTR_FONT 0x800 /* font file */
|
||||||
#define TREE_ATTR_LNG 0x1000 /* binary lang 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;
|
dptr->attr |= TREE_ATTR_MPA;
|
||||||
else if (!strcasecmp(&entry->d_name[len-4], ".m3u"))
|
else if (!strcasecmp(&entry->d_name[len-4], ".m3u"))
|
||||||
dptr->attr |= TREE_ATTR_M3U;
|
dptr->attr |= TREE_ATTR_M3U;
|
||||||
else if (!strcasecmp(&entry->d_name[len-3], ".eq"))
|
else if (!strcasecmp(&entry->d_name[len-3], ".cfg"))
|
||||||
dptr->attr |= TREE_ATTR_EQ;
|
dptr->attr |= TREE_ATTR_CFG;
|
||||||
else if (!strcasecmp(&entry->d_name[len-4], ".wps"))
|
else if (!strcasecmp(&entry->d_name[len-4], ".wps"))
|
||||||
dptr->attr |= TREE_ATTR_WPS;
|
dptr->attr |= TREE_ATTR_WPS;
|
||||||
else if (!strcasecmp(&entry->d_name[len-4], ".txt"))
|
else if (!strcasecmp(&entry->d_name[len-4], ".txt"))
|
||||||
|
@ -383,7 +383,7 @@ static int showdir(char *path, int start)
|
||||||
icon_type = Wps;
|
icon_type = Wps;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TREE_ATTR_EQ:
|
case TREE_ATTR_CFG:
|
||||||
icon_type = Wps;
|
icon_type = Wps;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -806,10 +806,10 @@ bool dirbrowse(char *root)
|
||||||
restore = true;
|
restore = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TREE_ATTR_EQ:
|
case TREE_ATTR_CFG:
|
||||||
snprintf(buf, sizeof buf, "%s/%s",
|
snprintf(buf, sizeof buf, "%s/%s",
|
||||||
currdir, file->name);
|
currdir, file->name);
|
||||||
settings_load_eq(buf);
|
settings_load_config(buf);
|
||||||
restore = true;
|
restore = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue