diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-09-15 17:29:15 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-09-15 17:29:15 +0000 |
commit | 12a957b0e8950258e77bb5a944ff0c3756bdd7f8 (patch) | |
tree | 25d0cf023ca5e7ab9f6591198e883ca8fda0a7c9 | |
parent | 219b1f58a6ac742ea8ed796b89b40e84ab084c19 (diff) |
Disable wrapping of the bass and treble settings and do the same for volume in a cleaner way, closes FS#7783
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14712 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/option_select.c | 2 | ||||
-rw-r--r-- | apps/settings_list.c | 6 | ||||
-rw-r--r-- | apps/settings_list.h | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 7752b35085..474c459ff1 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -293,7 +293,7 @@ bool option_screen(struct settings_list *setting, struct gui_synclist lists; int oldvalue, nb_items = 0, selected = 0, temp_var; int *variable; - bool allow_wrap = ((int*)setting->setting != &global_settings.volume); + bool allow_wrap = setting->flags & F_NO_WRAP ? false : true; int var_type = setting->flags&F_T_MASK; void (*function)(int) = NULL; char *title; diff --git a/apps/settings_list.c b/apps/settings_list.c index 1218dbf3e4..67ebec8866 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -382,10 +382,10 @@ static long jumpscroll_getlang(int value) const struct settings_list settings[] = { /* sound settings */ - SOUND_SETTING(0,volume, LANG_VOLUME, "volume", SOUND_VOLUME), + SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME), SOUND_SETTING(BALANCE_FLIP, balance, LANG_BALANCE, "balance", SOUND_BALANCE), - SOUND_SETTING(0,bass, LANG_BASS, "bass", SOUND_BASS), - SOUND_SETTING(0,treble, LANG_TREBLE, "treble", SOUND_TREBLE), + SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS), + SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE), #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS), diff --git a/apps/settings_list.h b/apps/settings_list.h index b7044c8039..05da5e8b20 100644 --- a/apps/settings_list.h +++ b/apps/settings_list.h @@ -102,8 +102,9 @@ struct choice_setting { - number of bytes for a NVRAM setting is changed - a NVRAM setting is removed */ -#define F_TEMPVAR 0x400 /* used if the setting should be set using a temp var */ -#define F_FLIPLIST 0x800 /* used if the order in the setting screen is backwards */ +#define F_TEMPVAR 0x0400 /* used if the setting should be set using a temp var */ +#define F_FLIPLIST 0x0800 /* used if the order in the setting screen is backwards */ +#define F_NO_WRAP 0x1000 /* used if the list should not wrap */ struct settings_list { uint32_t flags; /* ____ ___R TFFF ____ NNN_ FTVC IFRB STTT */ |