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 | |
parent | b882f8f4e3068413d82742fd737eec92b9c382a2 (diff) | |
download | rockbox-d6812f471fcc1021cc9f1c433f9859c369a12d6f.tar.gz rockbox-d6812f471fcc1021cc9f1c433f9859c369a12d6f.zip |
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')
-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 { | |||
124 | } current; | 124 | } current; |
125 | static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; | 125 | static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; |
126 | #ifdef HAVE_LCD_BITMAP | 126 | #ifdef HAVE_LCD_BITMAP |
127 | static int uifont = -1; | ||
127 | static int font_ui_height = 1; | 128 | static int font_ui_height = 1; |
128 | static struct viewport vp_info[NB_SCREENS]; | 129 | static struct viewport vp_info[NB_SCREENS]; |
129 | #endif | 130 | #endif |
@@ -441,7 +442,8 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
441 | struct lrc_word *lrc_word; | 442 | struct lrc_word *lrc_word; |
442 | int nlrcbrpos = 0, max_lrcbrpos; | 443 | int nlrcbrpos = 0, max_lrcbrpos; |
443 | #ifdef HAVE_LCD_BITMAP | 444 | #ifdef HAVE_LCD_BITMAP |
444 | struct font* pf = rb->font_get(FONT_UI); | 445 | uifont = rb->screens[0]->getuifont(); |
446 | struct font* pf = rb->font_get(uifont); | ||
445 | unsigned short ch; | 447 | unsigned short ch; |
446 | #endif | 448 | #endif |
447 | struct snap { | 449 | struct snap { |
@@ -1651,7 +1653,7 @@ static void display_time(void) | |||
1651 | vp_info[i].width, SYSFONT_HEIGHT-2, | 1653 | vp_info[i].width, SYSFONT_HEIGHT-2, |
1652 | current.length, 0, current.elapsed, HORIZONTAL); | 1654 | current.length, 0, current.elapsed, HORIZONTAL); |
1653 | display->update_viewport_rect(0, y, vp_info[i].width, SYSFONT_HEIGHT*2); | 1655 | display->update_viewport_rect(0, y, vp_info[i].width, SYSFONT_HEIGHT*2); |
1654 | display->setfont(FONT_UI); | 1656 | display->setfont(uifont); |
1655 | display->set_viewport(NULL); | 1657 | display->set_viewport(NULL); |
1656 | } | 1658 | } |
1657 | #else | 1659 | #else |
@@ -2914,7 +2916,8 @@ enum plugin_status plugin_start(const void* parameter) | |||
2914 | load_or_save_settings(false); | 2916 | load_or_save_settings(false); |
2915 | 2917 | ||
2916 | #ifdef HAVE_LCD_BITMAP | 2918 | #ifdef HAVE_LCD_BITMAP |
2917 | rb->lcd_getstringsize("O", NULL, &font_ui_height); | 2919 | uifont = rb->screens[0]->getuifont(); |
2920 | font_ui_height = rb->font_get(uifont)->height; | ||
2918 | #endif | 2921 | #endif |
2919 | 2922 | ||
2920 | lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); | 2923 | lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); |