revert r27027,27028, 27071 - need to find a correct way to close font fd's. 27027 caused data aborts, 27028 caused multifont issues after returning from usb

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27072 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-06-23 02:57:04 +00:00
parent 0a776db62a
commit 6281d8e214
2 changed files with 2 additions and 11 deletions

View 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)

View 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;
}
}