diff options
author | Fred Bauer <fred.w.bauer@gmail.com> | 2011-11-10 02:50:30 +0000 |
---|---|---|
committer | Fred Bauer <fred.w.bauer@gmail.com> | 2011-11-10 02:50:30 +0000 |
commit | d6812f471fcc1021cc9f1c433f9859c369a12d6f (patch) | |
tree | 3956a5ef707a47a0b975db57cbf268fa4d9c6659 /apps/plugins/lrcplayer.c | |
parent | b882f8f4e3068413d82742fd737eec92b9c382a2 (diff) |
Update lyrics player plugin for FONT_UI deprecation in r30932 (fix for FS#12374)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30949 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lrcplayer.c')
-rw-r--r-- | apps/plugins/lrcplayer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index ca275deb83..cc0128b401 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -124,6 +124,7 @@ static struct lrc_info { } current; static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; #ifdef HAVE_LCD_BITMAP +static int uifont = -1; static int font_ui_height = 1; static struct viewport vp_info[NB_SCREENS]; #endif @@ -441,7 +442,8 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) struct lrc_word *lrc_word; int nlrcbrpos = 0, max_lrcbrpos; #ifdef HAVE_LCD_BITMAP - struct font* pf = rb->font_get(FONT_UI); + uifont = rb->screens[0]->getuifont(); + struct font* pf = rb->font_get(uifont); unsigned short ch; #endif struct snap { @@ -1651,7 +1653,7 @@ static void display_time(void) vp_info[i].width, SYSFONT_HEIGHT-2, current.length, 0, current.elapsed, HORIZONTAL); display->update_viewport_rect(0, y, vp_info[i].width, SYSFONT_HEIGHT*2); - display->setfont(FONT_UI); + display->setfont(uifont); display->set_viewport(NULL); } #else @@ -2914,7 +2916,8 @@ enum plugin_status plugin_start(const void* parameter) load_or_save_settings(false); #ifdef HAVE_LCD_BITMAP - rb->lcd_getstringsize("O", NULL, &font_ui_height); + uifont = rb->screens[0]->getuifont(); + font_ui_height = rb->font_get(uifont)->height; #endif lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); |