summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c76
1 files changed, 39 insertions, 37 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 954b7d3dcf..51846fa2b2 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -360,7 +360,7 @@ bool settings_load_config(const char* file, bool apply)
360 settings_save(); 360 settings_save();
361 if (apply) 361 if (apply)
362 { 362 {
363 settings_apply(); 363 settings_apply(true);
364 settings_apply_skins(); 364 settings_apply_skins();
365 } 365 }
366 return true; 366 return true;
@@ -741,7 +741,7 @@ void sound_settings_apply(void)
741} 741}
742 742
743 743
744void settings_apply(void) 744void settings_apply(bool read_disk)
745{ 745{
746 746
747 char buf[64]; 747 char buf[64];
@@ -833,52 +833,54 @@ void settings_apply(void)
833 audiohw_enable_speaker(global_settings.speaker_enabled); 833 audiohw_enable_speaker(global_settings.speaker_enabled);
834#endif 834#endif
835 835
836 if (read_disk)
837 {
836#ifdef HAVE_LCD_BITMAP 838#ifdef HAVE_LCD_BITMAP
837 /* fonts need to be loaded before the WPS */ 839 /* fonts need to be loaded before the WPS */
838 if (global_settings.font_file[0] 840 if (global_settings.font_file[0]
839 && global_settings.font_file[0] != '-') { 841 && global_settings.font_file[0] != '-') {
840 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", 842 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
841 global_settings.font_file); 843 global_settings.font_file);
842 if (font_load(NULL, buf) < 0) 844 if (font_load(NULL, buf) < 0)
845 font_reset(NULL);
846 }
847 else
843 font_reset(NULL); 848 font_reset(NULL);
844 }
845 else
846 font_reset(NULL);
847#ifdef HAVE_REMOTE_LCD 849#ifdef HAVE_REMOTE_LCD
848 if ( global_settings.remote_font_file[0] 850 if ( global_settings.remote_font_file[0]
849 && global_settings.remote_font_file[0] != '-') { 851 && global_settings.remote_font_file[0] != '-') {
850 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", 852 snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
851 global_settings.remote_font_file); 853 global_settings.remote_font_file);
852 if (font_load_remoteui(buf) < 0) 854 if (font_load_remoteui(buf) < 0)
855 font_load_remoteui(NULL);
856 }
857 else
853 font_load_remoteui(NULL); 858 font_load_remoteui(NULL);
854 }
855 else
856 font_load_remoteui(NULL);
857#endif 859#endif
858 if ( global_settings.kbd_file[0]) { 860 if ( global_settings.kbd_file[0]) {
859 snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd", 861 snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd",
860 global_settings.kbd_file); 862 global_settings.kbd_file);
861 load_kbd(buf); 863 load_kbd(buf);
862 } 864 }
863 else 865 else
864 load_kbd(NULL); 866 load_kbd(NULL);
865#endif 867#endif
866 868
867 if ( global_settings.lang_file[0]) { 869 if ( global_settings.lang_file[0]) {
868 snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", 870 snprintf(buf, sizeof buf, LANG_DIR "/%s.lng",
869 global_settings.lang_file); 871 global_settings.lang_file);
870 lang_core_load(buf); 872 lang_core_load(buf);
871 talk_init(); /* use voice of same language */ 873 talk_init(); /* use voice of same language */
872 } 874 }
873 875
874 /* load the icon set */ 876 /* load the icon set */
875 icons_init(); 877 icons_init();
876 878
877#ifdef HAVE_LCD_COLOR 879#ifdef HAVE_LCD_COLOR
878 if (global_settings.colors_file[0]) 880 if (global_settings.colors_file[0])
879 read_color_theme_file(); 881 read_color_theme_file();
880#endif 882#endif
881 883 }
882#ifdef HAVE_LCD_COLOR 884#ifdef HAVE_LCD_COLOR
883 screens[SCREEN_MAIN].set_foreground(global_settings.fg_color); 885 screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
884 screens[SCREEN_MAIN].set_background(global_settings.bg_color); 886 screens[SCREEN_MAIN].set_background(global_settings.bg_color);