diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-11-24 11:18:29 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-11-24 11:18:29 +0000 |
commit | a9fa492dfb11dec7bd9f18785a6a66f1bcdd75ad (patch) | |
tree | e43c7854957fecc62aabe088cb139e6e40310764 /apps | |
parent | 7da37b8f9c26b5497be61ced964c68383bce39f0 (diff) | |
download | rockbox-a9fa492dfb11dec7bd9f18785a6a66f1bcdd75ad.tar.gz rockbox-a9fa492dfb11dec7bd9f18785a6a66f1bcdd75ad.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/option_select.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index ec86de7ee2..297afef985 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -158,12 +158,13 @@ static int option_talk(int selected_item, void * data) | |||
158 | } | 158 | } |
159 | else if ((setting->flags & F_T_SOUND) == F_T_SOUND) | 159 | else if ((setting->flags & F_T_SOUND) == F_T_SOUND) |
160 | { | 160 | { |
161 | int talkunit = UNIT_DB; | 161 | int talkunit = UNIT_INT; |
162 | const char *unit = sound_unit(setting->sound_setting->setting); | 162 | const char *unit = sound_unit(setting->sound_setting->setting); |
163 | /* crude reconstruction */ | 163 | if (!strcmp(unit, "dB")) |
164 | if (*unit == '%') | 164 | talkunit = UNIT_DB; |
165 | else if (!strcmp(unit, "%")) | ||
165 | talkunit = UNIT_PERCENT; | 166 | talkunit = UNIT_PERCENT; |
166 | else if (*unit == 'H') | 167 | else if (!strcmp(unit, "Hz")) |
167 | talkunit = UNIT_HERTZ; | 168 | talkunit = UNIT_HERTZ; |
168 | talk_value((int)temp_var, talkunit, false); | 169 | talk_value((int)temp_var, talkunit, false); |
169 | } | 170 | } |