Fix FS#7952 - flip list settings didnt work properly

Accept FS#7956 - flip some sound settings on wheel targets so clockwise increases


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15113 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-10-15 05:35:20 +00:00
parent 1515ff8522
commit 58777c350a
3 changed files with 16 additions and 7 deletions

View file

@ -336,7 +336,14 @@ bool option_screen(struct settings_list *setting,
int min = sound_min(setting_id);
int max = sound_max(setting_id);
nb_items = (max-min)/steps + 1;
if (setting->flags&F_FLIPLIST)
{
selected = (oldvalue - min) / steps;
}
else
{
selected = (max - oldvalue) / steps;
}
function = sound_get_fn(setting_id);
}
else

View file

@ -375,17 +375,17 @@ static long jumpscroll_getlang(int value)
(CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_4G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define BALANCE_FLIP F_FLIPLIST
#define FLIP_IF_WHEEL F_FLIPLIST
#else
#define BALANCE_FLIP 0
#define FLIP_IF_WHEEL 0
#endif
const struct settings_list settings[] = {
/* sound settings */
SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
SOUND_SETTING(BALANCE_FLIP, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE),
SOUND_SETTING(FLIP_IF_WHEEL | F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
SOUND_SETTING(FLIP_IF_WHEEL, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
SOUND_SETTING(FLIP_IF_WHEEL | F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
SOUND_SETTING(FLIP_IF_WHEEL | 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

@ -342,6 +342,8 @@ Stepan Moskovchenko
John S. Gwynne
Brian J. Morey
Stijn Hisken
Bertrik Sikken
The libmad team
The wavpack team
The ffmpeg team