summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-08 12:40:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-08 12:40:25 +0000
commit0f68958b11bfc0c23027666e85c4d0ff99d6bef1 (patch)
tree280546d0204c4a13aeaf4322c9049fcf66aa7a68 /apps/settings.c
parent7b4cc78f03d27a1fa8a54326f99c4640c7d90bf0 (diff)
Henrik Backe's patch that introduces 'fonts' and 'langs' subdirectories
in .rockbox git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/settings.c b/apps/settings.c
index b08ed8475d..1cde6e02e7 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -544,7 +544,7 @@ void settings_apply(void)
#ifdef HAVE_LCD_BITMAP
if ( global_settings.font_file[0] &&
global_settings.font_file[0] != 0xff ) {
- snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.fnt",
+ snprintf(buf, sizeof buf, ROCKBOX_DIR FONT_DIR "/%s.fnt",
global_settings.font_file);
font_load(buf);
}
@@ -561,7 +561,7 @@ void settings_apply(void)
if ( global_settings.lang_file[0] &&
global_settings.lang_file[0] != 0xff ) {
- snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.lng",
+ snprintf(buf, sizeof buf, ROCKBOX_DIR LANG_DIR "/%s.lng",
global_settings.lang_file);
lang_load(buf);
}
@@ -829,7 +829,8 @@ void set_file(char* filename, char* setting, int maxlen)
ptr--;
}
- if (strcmp(ROCKBOX_DIR, filename) || (len-extlen > maxlen))
+ if (strncmp(ROCKBOX_DIR, filename ,strlen(ROCKBOX_DIR)) ||
+ (len-extlen > maxlen))
return;
strncpy(setting, fptr, len-extlen);
@@ -1187,12 +1188,12 @@ bool settings_save_config(void)
global_settings.wps_file);
if (global_settings.lang_file[0] != 0)
- fprintf(fd, "lang: %s/%s.lng\r\n", ROCKBOX_DIR,
+ fprintf(fd, "lang: %s/%s.lng\r\n", ROCKBOX_DIR LANG_DIR,
global_settings.lang_file);
#ifdef HAVE_LCD_BITMAP
if (global_settings.font_file[0] != 0)
- fprintf(fd, "font: %s/%s.fnt\r\n", ROCKBOX_DIR,
+ fprintf(fd, "font: %s/%s.fnt\r\n", ROCKBOX_DIR FONT_DIR,
global_settings.font_file);
#endif