r27028 again.. properly close font fd's and reload the skins on usb exit (disk should...
authorjdgordon <jdgordon@a1c6a512-1295-4272-9138-f99709370657>
Wed, 23 Jun 2010 05:48:35 +0000 (23 05:48 +0000)
committerjdgordon <jdgordon@a1c6a512-1295-4272-9138-f99709370657>
Wed, 23 Jun 2010 05:48:35 +0000 (23 05:48 +0000)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27077 a1c6a512-1295-4272-9138-f99709370657

apps/gui/usb_screen.c

index 6500413..00e128b 100644 (file)
@@ -41,6 +41,7 @@
 
 #ifdef HAVE_LCD_BITMAP
 #include "bitmaps/usblogo.h"
+#include "skin_engine/skin_fonts.h"
 #endif
 
 #ifdef HAVE_REMOTE_LCD
@@ -261,6 +262,14 @@ void gui_usb_screen_run(void)
     usb_keypad_mode = global_settings.usb_keypad_mode;
 #endif
 
+    /* The font system leaves the .fnt fd's open, so we need for force close them all */
+#ifdef HAVE_LCD_BITMAP
+    font_reset(NULL);
+#ifdef HAVE_REMOTE_LCD
+    font_load_remoteui(NULL);
+#endif
+    skin_font_init(); /* unload all the skin fonts */
+#endif
     FOR_NB_SCREENS(i)
     {
         struct screen *screen = &screens[i];
@@ -314,6 +323,11 @@ void gui_usb_screen_run(void)
 #ifdef HAVE_LCD_CHARCELLS
     status_set_usb(false);
 #endif /* HAVE_LCD_CHARCELLS */
+#ifdef HAVE_LCD_BITMAP
+    /* Not pretty, reload all settings so fonts are loaded again correctly */
+    settings_apply(true);
+    settings_apply_skins();
+#endif
 
     FOR_NB_SCREENS(i)
     {