Make the sound settings talk unit selection slightly less hackish, and make it handle unitless settings (like the new bass/treble cutoff setting on iPod Video).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15788 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7da37b8f9c
commit
a9fa492dfb
1 changed files with 5 additions and 4 deletions
|
@ -158,12 +158,13 @@ static int option_talk(int selected_item, void * data)
|
|||
}
|
||||
else if ((setting->flags & F_T_SOUND) == F_T_SOUND)
|
||||
{
|
||||
int talkunit = UNIT_DB;
|
||||
int talkunit = UNIT_INT;
|
||||
const char *unit = sound_unit(setting->sound_setting->setting);
|
||||
/* crude reconstruction */
|
||||
if (*unit == '%')
|
||||
if (!strcmp(unit, "dB"))
|
||||
talkunit = UNIT_DB;
|
||||
else if (!strcmp(unit, "%"))
|
||||
talkunit = UNIT_PERCENT;
|
||||
else if (*unit == 'H')
|
||||
else if (!strcmp(unit, "Hz"))
|
||||
talkunit = UNIT_HERTZ;
|
||||
talk_value((int)temp_var, talkunit, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue