summaryrefslogtreecommitdiffstats
path: root/firmware/font.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-23 02:57:04 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-23 02:57:04 +0000
commit6281d8e21434878a72e63bf917f6c5520f9fb2c1 (patch)
tree6fe57e663d10811a9df635aa882886603b337251 /firmware/font.c
parent0a776db62a22fed1731f058282047c682668cc66 (diff)
downloadrockbox-6281d8e21434878a72e63bf917f6c5520f9fb2c1.tar.gz
rockbox-6281d8e21434878a72e63bf917f6c5520f9fb2c1.tar.bz2
rockbox-6281d8e21434878a72e63bf917f6c5520f9fb2c1.zip
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
Diffstat (limited to 'firmware/font.c')
-rw-r--r--firmware/font.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/firmware/font.c b/firmware/font.c
index c5348d54ff..f1584713ed 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -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;
}
}