From e299eb3ea36cba48875cf35bb1dcc93eaba0d279 Mon Sep 17 00:00:00 2001 From: Fred Bauer Date: Sat, 22 Oct 2011 17:13:33 +0000 Subject: Add functions font_set_ui() and font_get_ui(). The font returned by FONT_UI used to be fixed at zero but since buflib-fonts (r30589) can be different, depending on the order of loads and unloads. Fixes broken behavoir in virtual keyboard (FS#12336), lyrics player (FS#12306), and hopefully, FS#12337 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30826 a1c6a512-1295-4272-9138-f99709370657 --- apps/filetree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/filetree.c') diff --git a/apps/filetree.c b/apps/filetree.c index 59e7343600..2407be9d79 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -427,7 +427,10 @@ static void ft_load_font(char *file) current_font_id = global_status.font_id[screen]; if (current_font_id >= 0) font_unload(current_font_id); - global_status.font_id[screen] = font_load(file); + current_font_id = font_load(file); + if(screen==SCREEN_MAIN) + font_set_ui(current_font_id); + global_status.font_id[screen] = current_font_id; viewportmanager_theme_changed(THEME_UI_VIEWPORT); } #endif -- cgit v1.2.3