forked from len0rd/rockbox
Have option_get_valuestring always call sound_val2phys before formatting rather than only if fractional places are specified.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25960 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
418c9eeb14
commit
1de56ac367
1 changed files with 2 additions and 3 deletions
|
|
@ -113,11 +113,10 @@ const char *option_get_valuestring(const struct settings_list *setting,
|
|||
{
|
||||
char sign = ' ';
|
||||
const char *unit = sound_unit(setting->sound_setting->setting);
|
||||
int val = sound_val2phys(setting->sound_setting->setting, (int)temp_var);
|
||||
if (sound_numdecimals(setting->sound_setting->setting))
|
||||
{
|
||||
int integer, dec;
|
||||
int val = sound_val2phys(setting->sound_setting->setting,
|
||||
(int)temp_var);
|
||||
if(val < 0)
|
||||
{
|
||||
sign = '-';
|
||||
|
|
@ -128,7 +127,7 @@ const char *option_get_valuestring(const struct settings_list *setting,
|
|||
snprintf(buffer, buf_len, "%c%d.%d %s", sign, integer, dec, unit);
|
||||
}
|
||||
else
|
||||
snprintf(buffer, buf_len, "%d %s", (int)temp_var, unit);
|
||||
snprintf(buffer, buf_len, "%d %s", val, unit);
|
||||
}
|
||||
else if ((setting->flags & F_CHOICE_SETTING) == F_CHOICE_SETTING)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue