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
This commit is contained in:
Nils Wallménius 2007-09-15 17:29:15 +00:00
parent 219b1f58a6
commit 12a957b0e8
3 changed files with 7 additions and 6 deletions

View file

@ -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;

View file

@ -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),

View file

@ -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 */