mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
b882f8f4e3
commit
d6812f471f
1 changed files with 6 additions and 3 deletions
|
@ -124,6 +124,7 @@ static struct lrc_info {
|
||||||
} current;
|
} current;
|
||||||
static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)];
|
static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)];
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
static int uifont = -1;
|
||||||
static int font_ui_height = 1;
|
static int font_ui_height = 1;
|
||||||
static struct viewport vp_info[NB_SCREENS];
|
static struct viewport vp_info[NB_SCREENS];
|
||||||
#endif
|
#endif
|
||||||
|
@ -441,7 +442,8 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
|
||||||
struct lrc_word *lrc_word;
|
struct lrc_word *lrc_word;
|
||||||
int nlrcbrpos = 0, max_lrcbrpos;
|
int nlrcbrpos = 0, max_lrcbrpos;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#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;
|
unsigned short ch;
|
||||||
#endif
|
#endif
|
||||||
struct snap {
|
struct snap {
|
||||||
|
@ -1651,7 +1653,7 @@ static void display_time(void)
|
||||||
vp_info[i].width, SYSFONT_HEIGHT-2,
|
vp_info[i].width, SYSFONT_HEIGHT-2,
|
||||||
current.length, 0, current.elapsed, HORIZONTAL);
|
current.length, 0, current.elapsed, HORIZONTAL);
|
||||||
display->update_viewport_rect(0, y, vp_info[i].width, SYSFONT_HEIGHT*2);
|
display->update_viewport_rect(0, y, vp_info[i].width, SYSFONT_HEIGHT*2);
|
||||||
display->setfont(FONT_UI);
|
display->setfont(uifont);
|
||||||
display->set_viewport(NULL);
|
display->set_viewport(NULL);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -2914,7 +2916,8 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
load_or_save_settings(false);
|
load_or_save_settings(false);
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#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
|
#endif
|
||||||
|
|
||||||
lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size);
|
lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue