From 746501f552b2aebe113ba2116f5beb03494ae9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Wed, 9 Oct 2002 08:51:08 +0000 Subject: 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 --- apps/settings.c | 9 ++++++--- 1 file 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); -- cgit v1.2.3