mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
option_get_valuestring: fix trailing whitespace for UNIT_INT
Remove trailing whitespace from int settings, so that right-aligned or centered values look correct in Quickscreen for settings such as Brightness. Change-Id: I006cf3c3e8b30be2246e7370f26e0428fa47e54b
This commit is contained in:
parent
10ec9bd530
commit
f2985dc8a2
1 changed files with 6 additions and 1 deletions
|
|
@ -108,7 +108,12 @@ const char *option_get_valuestring(const struct settings_list *setting,
|
|||
if (formatter)
|
||||
str = formatter(buffer, buf_len, (int)temp_var, str_unit);
|
||||
else if (!is_time_setting)
|
||||
snprintf(buffer, buf_len, "%d %s", (int)temp_var, str_unit?str_unit:"");
|
||||
{
|
||||
if (str_unit && str_unit[0])
|
||||
snprintf(buffer, buf_len, "%d %s", (int)temp_var, str_unit);
|
||||
else
|
||||
snprintf(buffer, buf_len, "%d", (int)temp_var);
|
||||
}
|
||||
}
|
||||
else if (HASFLAG(setting, F_T_SOUND))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue