diff options
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r-- | apps/gui/option_select.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 0452467994..f99e833a1e 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -106,23 +106,9 @@ const char *option_get_valuestring(const struct settings_list *setting, | |||
106 | } | 106 | } |
107 | else if ((setting->flags & F_T_SOUND) == F_T_SOUND) | 107 | else if ((setting->flags & F_T_SOUND) == F_T_SOUND) |
108 | { | 108 | { |
109 | char sign = ' '; | 109 | format_sound_value(buffer, buf_len, |
110 | const char *unit = sound_unit(setting->sound_setting->setting); | 110 | setting->sound_setting->setting, |
111 | int val = sound_val2phys(setting->sound_setting->setting, (int)temp_var); | 111 | temp_var); |
112 | if (sound_numdecimals(setting->sound_setting->setting)) | ||
113 | { | ||
114 | int integer, dec; | ||
115 | if(val < 0) | ||
116 | { | ||
117 | sign = '-'; | ||
118 | val = abs(val); | ||
119 | } | ||
120 | integer = val / 10; | ||
121 | dec = val % 10; | ||
122 | snprintf(buffer, buf_len, "%c%d.%d %s", sign, integer, dec, unit); | ||
123 | } | ||
124 | else | ||
125 | snprintf(buffer, buf_len, "%d %s", val, unit); | ||
126 | } | 112 | } |
127 | else if ((setting->flags & F_CHOICE_SETTING) == F_CHOICE_SETTING) | 113 | else if ((setting->flags & F_CHOICE_SETTING) == F_CHOICE_SETTING) |
128 | { | 114 | { |