forked from len0rd/rockbox
Properly generate (with "Save Theme Settings") and handle filename settings with "-".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24816 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3d6faa08bf
commit
ec0ca10ddf
3 changed files with 21 additions and 12 deletions
|
@ -465,10 +465,18 @@ bool cfg_to_string(int i/*setting_id*/, char* buf, int buf_len)
|
|||
if (((char*)settings[i].setting)[0]
|
||||
&& settings[i].filename_setting->prefix)
|
||||
{
|
||||
snprintf(buf,buf_len,"%s%s%s",
|
||||
settings[i].filename_setting->prefix,
|
||||
(char*)settings[i].setting,
|
||||
settings[i].filename_setting->suffix);
|
||||
if (((char*)settings[i].setting)[0] == '-')
|
||||
{
|
||||
buf[0] = '-';
|
||||
buf[1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(buf,buf_len,"%s%s%s",
|
||||
settings[i].filename_setting->prefix,
|
||||
(char*)settings[i].setting,
|
||||
settings[i].filename_setting->suffix);
|
||||
}
|
||||
}
|
||||
else strlcpy(buf,(char*)settings[i].setting,
|
||||
settings[i].filename_setting->max_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue