revert r27027,27028, 27071 - need to find a correct way to close font fd's. 27027...
authorjdgordon <jdgordon@a1c6a512-1295-4272-9138-f99709370657>
Wed, 23 Jun 2010 02:57:04 +0000 (23 02:57 +0000)
committerjdgordon <jdgordon@a1c6a512-1295-4272-9138-f99709370657>
Wed, 23 Jun 2010 02:57:04 +0000 (23 02:57 +0000)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27072 a1c6a512-1295-4272-9138-f99709370657

apps/gui/usb_screen.c
firmware/font.c

index 309f1a9..6500413 100644 (file)
@@ -274,10 +274,6 @@ void gui_usb_screen_run(void)
 #endif
     }
 
-#ifdef HAVE_LCD_BITMAP
-    for (i = FONT_UI; i < MAXFONTS; i++) font_unload(i);
-#endif
-
     while (1)
     {
         usb_screens_draw(usb_screen_vps_ar);
@@ -317,8 +313,6 @@ void gui_usb_screen_run(void)
 
 #ifdef HAVE_LCD_CHARCELLS
     status_set_usb(false);
-#else
-    settings_apply(true);
 #endif /* HAVE_LCD_CHARCELLS */
 
     FOR_NB_SCREENS(i)
index c5348d5..f158471 100644 (file)
@@ -449,14 +449,11 @@ int font_load(struct font* pf, const char *path)
 void font_unload(int font_id)
 {
     struct font* pf = sysfonts[font_id];
-    if (font_id && pf)
+    if (font_id >= SYSTEMFONTCOUNT && pf)
     {
         if (pf->fd >= 0)
             close(pf->fd);
-        if (font_id == FONT_UI)
-            font_reset(pf);
-        else if (font_id >= SYSTEMFONTCOUNT)
-            sysfonts[font_id] = NULL;
+        sysfonts[font_id] = NULL;
     }
 }