From 862570bdef6068c8e3952bd965c97c71cf8aa43c Mon Sep 17 00:00:00 2001 From: kugel Date: Sat, 27 Feb 2010 15:16:08 +0000 Subject: [PATCH] Properly handle empty and '-' font settings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24942 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/settings.c b/apps/settings.c index ffefa3157..954b7d3dc 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -835,7 +835,8 @@ void settings_apply(void) #ifdef HAVE_LCD_BITMAP /* fonts need to be loaded before the WPS */ - if ( global_settings.font_file[0]) { + if (global_settings.font_file[0] + && global_settings.font_file[0] != '-') { snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", global_settings.font_file); if (font_load(NULL, buf) < 0) @@ -844,7 +845,8 @@ void settings_apply(void) else font_reset(NULL); #ifdef HAVE_REMOTE_LCD - if ( global_settings.remote_font_file[0]) { + if ( global_settings.remote_font_file[0] + && global_settings.remote_font_file[0] != '-') { snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", global_settings.remote_font_file); if (font_load_remoteui(buf) < 0) -- 2.11.4.GIT