summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-09 08:51:08 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-09 08:51:08 +0000
commit746501f552b2aebe113ba2116f5beb03494ae9cb (patch)
tree66470c16c50b30053ab43923b6210be0925b7d83
parentcdf9f6b84bbd8c7a6ea34436bbb16e592f8a5205 (diff)
Don't try to load files if setting is empty
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2543 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c
index f03c1e888b..eb4409c805 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -377,19 +377,22 @@ void settings_apply(void)
charge_restart_level = global_settings.discharge ? CHARGE_RESTART_LO : CHARGE_RESTART_HI;
#endif
- if ( global_settings.wps_file[0] ) {
+ if ( global_settings.wps_file[0] &&
+ global_settings.wps_file[0] != 0xff ) {
snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.wps",
global_settings.wps_file);
wps_load(buf, false);
}
#ifdef HAVE_LCD_BITMAP
- if ( global_settings.font_file[0] ) {
+ if ( global_settings.font_file[0] &&
+ global_settings.font_file[0] != 0xff ) {
snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.fnt",
global_settings.font_file);
font_load(buf);
}
#endif
- if ( global_settings.lang_file[0] ) {
+ if ( global_settings.lang_file[0] &&
+ global_settings.lang_file[0] != 0xff ) {
snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.lng",
global_settings.lang_file);
lang_load(buf);