summaryrefslogtreecommitdiffstats
path: root/apps/screen_access.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-09-24 13:19:34 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-09-24 13:19:34 +0000
commitaa0f4a4bbe370032d8166628f456709be1330118 (patch)
tree597c91fb16493881d7a281ef3c28e274a899022b /apps/screen_access.c
parentf323300b82aa945dd4cadb20d8d7e23a6602ef49 (diff)
downloadrockbox-aa0f4a4bbe370032d8166628f456709be1330118.tar.gz
rockbox-aa0f4a4bbe370032d8166628f456709be1330118.tar.bz2
rockbox-aa0f4a4bbe370032d8166628f456709be1330118.zip
FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screen_access.c')
-rw-r--r--apps/screen_access.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/apps/screen_access.c b/apps/screen_access.c
index b83e842de8..0b206a668a 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -67,6 +67,15 @@ static int screen_helper_getnblines(void)
return height / screens[0].getcharheight();
}
+void screen_helper_setfont(int font)
+{
+#ifdef HAVE_LCD_BITMAP
+ if (font == FONT_UI)
+ font = global_status.font_id[SCREEN_MAIN];
+ lcd_setfont(font);
+#endif
+}
+
#if NB_SCREENS == 2
static int screen_helper_remote_getcharwidth(void)
{
@@ -99,6 +108,13 @@ static int screen_helper_remote_getnblines(void)
#endif
return height / screens[1].getcharheight();
}
+
+void screen_helper_remote_setfont(int font)
+{
+ if (font == FONT_UI)
+ font = global_status.font_id[SCREEN_REMOTE];
+ lcd_remote_setfont(font);
+}
#endif
struct screen screens[NB_SCREENS] =
@@ -129,7 +145,7 @@ struct screen screens[NB_SCREENS] =
.getheight=&lcd_getheight,
.getstringsize=&lcd_getstringsize,
#ifdef HAVE_LCD_BITMAP
- .setfont=&lcd_setfont,
+ .setfont=screen_helper_setfont,
.getfont=&lcd_getfont,
.mono_bitmap=&lcd_mono_bitmap,
.mono_bitmap_part=&lcd_mono_bitmap_part,
@@ -229,7 +245,7 @@ struct screen screens[NB_SCREENS] =
.getheight=&lcd_remote_getheight,
.getstringsize=&lcd_remote_getstringsize,
#if 1 /* all remote LCDs are bitmapped so far */
- .setfont=&lcd_remote_setfont,
+ .setfont=screen_helper_setfont,
.getfont=&lcd_remote_getfont,
.mono_bitmap=&lcd_remote_mono_bitmap,
.mono_bitmap_part=&lcd_remote_mono_bitmap_part,