summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-02-21 20:34:27 +0000
committerThomas Martitz <kugel@rockbox.org>2010-02-21 20:34:27 +0000
commitec0ca10ddf58604d8ce2a5f73cedabbaa8965a75 (patch)
treeaf46ec42a418275ae162c349766c77db891fdbe8 /apps/settings.c
parent3d6faa08bf95da6e0f65a070a11f014e78c0b682 (diff)
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
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 536e5e90ee..0bd073e66d 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -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);