diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 10:31:31 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 658026e6267277b27d297c481728f74d160a8481 (patch) | |
tree | 915a9d2bb48469bdd5b9127dc19a61f230721a6c /apps/plugins/lrcplayer.c | |
parent | 8cb555460ff79e636a7907fb2589e16db98c8600 (diff) | |
download | rockbox-658026e6267277b27d297c481728f74d160a8481.tar.gz rockbox-658026e6267277b27d297c481728f74d160a8481.zip |
[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
Diffstat (limited to 'apps/plugins/lrcplayer.c')
-rw-r--r-- | apps/plugins/lrcplayer.c | 73 |
1 files changed, 4 insertions, 69 deletions
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 1b017942a9..2c7742fd94 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c | |||
@@ -71,14 +71,12 @@ struct preferences { | |||
71 | unsigned active_color; | 71 | unsigned active_color; |
72 | unsigned inactive_color; | 72 | unsigned inactive_color; |
73 | #endif | 73 | #endif |
74 | #ifdef HAVE_LCD_BITMAP | ||
75 | bool wrap; | 74 | bool wrap; |
76 | bool wipe; | 75 | bool wipe; |
77 | bool active_one_line; | 76 | bool active_one_line; |
78 | int align; /* 0: left, 1: center, 2: right */ | 77 | int align; /* 0: left, 1: center, 2: right */ |
79 | bool statusbar_on; | 78 | bool statusbar_on; |
80 | bool display_title; | 79 | bool display_title; |
81 | #endif | ||
82 | bool display_time; | 80 | bool display_time; |
83 | bool backlight_on; | 81 | bool backlight_on; |
84 | 82 | ||
@@ -118,16 +116,12 @@ static struct lrc_info { | |||
118 | bool loaded_lrc; | 116 | bool loaded_lrc; |
119 | bool changed_lrc; | 117 | bool changed_lrc; |
120 | bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ | 118 | bool too_many_lines; /* true if nlrcline >= max_lrclines after calc pos */ |
121 | #ifdef HAVE_LCD_BITMAP | ||
122 | bool wipe; /* false if lyrics is unsynched */ | 119 | bool wipe; /* false if lyrics is unsynched */ |
123 | #endif | ||
124 | } current; | 120 | } current; |
125 | static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; | 121 | static char temp_buf[MAX(MAX_LINE_LEN,MAX_PATH)]; |
126 | #ifdef HAVE_LCD_BITMAP | ||
127 | static int uifont = -1; | 122 | static int uifont = -1; |
128 | static int font_ui_height = 1; | 123 | static int font_ui_height = 1; |
129 | static struct viewport vp_info[NB_SCREENS]; | 124 | static struct viewport vp_info[NB_SCREENS]; |
130 | #endif | ||
131 | static struct viewport vp_lyrics[NB_SCREENS]; | 125 | static struct viewport vp_lyrics[NB_SCREENS]; |
132 | 126 | ||
133 | #define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE) | 127 | #define AUDIO_PAUSE (current.audio_status & AUDIO_STATUS_PAUSE) |
@@ -221,11 +215,9 @@ static int lrc_set_time(const char *title, const char *unit, long *pval, | |||
221 | { | 215 | { |
222 | /* draw cursor */ | 216 | /* draw cursor */ |
223 | buffer[p_end-1] = 0; | 217 | buffer[p_end-1] = 0; |
224 | #ifdef HAVE_LCD_BITMAP | ||
225 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 218 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
226 | rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); | 219 | rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); |
227 | rb->lcd_set_drawmode(DRMODE_SOLID); | 220 | rb->lcd_set_drawmode(DRMODE_SOLID); |
228 | #endif | ||
229 | } | 221 | } |
230 | rb->lcd_update(); | 222 | rb->lcd_update(); |
231 | int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); | 223 | int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); |
@@ -394,19 +386,16 @@ static int format_time_tag(char *buf, long t) | |||
394 | /* find start of next line */ | 386 | /* find start of next line */ |
395 | static const char *lrc_skip_space(const char *str) | 387 | static const char *lrc_skip_space(const char *str) |
396 | { | 388 | { |
397 | #ifdef HAVE_LCD_BITMAP | ||
398 | if (prefs.wrap) | 389 | if (prefs.wrap) |
399 | { | 390 | { |
400 | while (*str && *str != '\n' && isspace(*str)) | 391 | while (*str && *str != '\n' && isspace(*str)) |
401 | str++; | 392 | str++; |
402 | } | 393 | } |
403 | #endif | ||
404 | if (*str == '\n') | 394 | if (*str == '\n') |
405 | str++; | 395 | str++; |
406 | return str; | 396 | return str; |
407 | } | 397 | } |
408 | 398 | ||
409 | #ifdef HAVE_LCD_BITMAP | ||
410 | static bool isbrchr(const unsigned char *str, int len) | 399 | static bool isbrchr(const unsigned char *str, int len) |
411 | { | 400 | { |
412 | const unsigned char *p = "!,-.:;? 、。!,.:;?―"; | 401 | const unsigned char *p = "!,-.:;? 、。!,.:;?―"; |
@@ -422,7 +411,6 @@ static bool isbrchr(const unsigned char *str, int len) | |||
422 | } | 411 | } |
423 | return false; | 412 | return false; |
424 | } | 413 | } |
425 | #endif | ||
426 | 414 | ||
427 | /* calculate how many lines is needed to display and store it. | 415 | /* calculate how many lines is needed to display and store it. |
428 | * create cache if there is enough space in lrc_buffer. */ | 416 | * create cache if there is enough space in lrc_buffer. */ |
@@ -431,11 +419,9 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i) | |||
431 | struct lrc_brpos *lrc_brpos; | 419 | struct lrc_brpos *lrc_brpos; |
432 | struct lrc_word *lrc_word; | 420 | struct lrc_word *lrc_word; |
433 | int nlrcbrpos = 0, max_lrcbrpos; | 421 | int nlrcbrpos = 0, max_lrcbrpos; |
434 | #ifdef HAVE_LCD_BITMAP | ||
435 | uifont = rb->screens[0]->getuifont(); | 422 | uifont = rb->screens[0]->getuifont(); |
436 | struct font* pf = rb->font_get(uifont); | 423 | struct font* pf = rb->font_get(uifont); |
437 | unsigned short ch; | 424 | unsigned short ch; |
438 | #endif | ||
439 | struct snap { | 425 | struct snap { |
440 | int count, width; | 426 | int count, width; |
441 | int nword; | 427 | int nword; |
@@ -1559,7 +1545,6 @@ static void display_state(void) | |||
1559 | str = "No lyrics"; | 1545 | str = "No lyrics"; |
1560 | } | 1546 | } |
1561 | 1547 | ||
1562 | #ifdef HAVE_LCD_BITMAP | ||
1563 | const char *info = NULL; | 1548 | const char *info = NULL; |
1564 | 1549 | ||
1565 | if (AUDIO_PLAY && prefs.display_title) | 1550 | if (AUDIO_PLAY && prefs.display_title) |
@@ -1605,13 +1590,6 @@ static void display_state(void) | |||
1605 | display->update_viewport(); | 1590 | display->update_viewport(); |
1606 | display->set_viewport(NULL); | 1591 | display->set_viewport(NULL); |
1607 | } | 1592 | } |
1608 | #else | ||
1609 | /* there is no place to display title or artist. */ | ||
1610 | rb->lcd_clear_display(); | ||
1611 | if (str) | ||
1612 | rb->lcd_puts_scroll(0, 0, str); | ||
1613 | rb->lcd_update(); | ||
1614 | #endif /* HAVE_LCD_BITMAP */ | ||
1615 | } | 1593 | } |
1616 | 1594 | ||
1617 | static void display_time(void) | 1595 | static void display_time(void) |
@@ -1619,7 +1597,6 @@ static void display_time(void) | |||
1619 | rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", | 1597 | rb->snprintf(temp_buf, MAX_LINE_LEN, "%ld:%02ld/%ld:%02ld", |
1620 | current.elapsed/60000, (current.elapsed/1000)%60, | 1598 | current.elapsed/60000, (current.elapsed/1000)%60, |
1621 | current.length/60000, (current.length)/1000%60); | 1599 | current.length/60000, (current.length)/1000%60); |
1622 | #ifdef HAVE_LCD_BITMAP | ||
1623 | int y = (prefs.display_title? font_ui_height:0); | 1600 | int y = (prefs.display_title? font_ui_height:0); |
1624 | FOR_NB_SCREENS(i) | 1601 | FOR_NB_SCREENS(i) |
1625 | { | 1602 | { |
@@ -1634,16 +1611,11 @@ static void display_time(void) | |||
1634 | display->setfont(uifont); | 1611 | display->setfont(uifont); |
1635 | display->set_viewport(NULL); | 1612 | display->set_viewport(NULL); |
1636 | } | 1613 | } |
1637 | #else | ||
1638 | rb->lcd_puts(0, 0, temp_buf); | ||
1639 | rb->lcd_update(); | ||
1640 | #endif /* HAVE_LCD_BITMAP */ | ||
1641 | } | 1614 | } |
1642 | 1615 | ||
1643 | /******************************* | 1616 | /******************************* |
1644 | * Display lyrics | 1617 | * Display lyrics |
1645 | *******************************/ | 1618 | *******************************/ |
1646 | #ifdef HAVE_LCD_BITMAP | ||
1647 | static inline void set_to_default(struct screen *display) | 1619 | static inline void set_to_default(struct screen *display) |
1648 | { | 1620 | { |
1649 | #if (LCD_DEPTH > 1) | 1621 | #if (LCD_DEPTH > 1) |
@@ -1817,7 +1789,6 @@ static int display_lrc_line(struct lrc_line *lrc_line, int ypos, int i) | |||
1817 | set_to_default(display); | 1789 | set_to_default(display); |
1818 | return ypos; | 1790 | return ypos; |
1819 | } | 1791 | } |
1820 | #endif /* HAVE_LCD_BITMAP */ | ||
1821 | 1792 | ||
1822 | static void display_lrcs(void) | 1793 | static void display_lrcs(void) |
1823 | { | 1794 | { |
@@ -1848,7 +1819,7 @@ static void display_lrcs(void) | |||
1848 | /* display current line at the center of the viewport */ | 1819 | /* display current line at the center of the viewport */ |
1849 | display->set_viewport(&vp_lyrics[i]); | 1820 | display->set_viewport(&vp_lyrics[i]); |
1850 | display->clear_viewport(); | 1821 | display->clear_viewport(); |
1851 | #ifdef HAVE_LCD_BITMAP | 1822 | |
1852 | struct lrc_line *lrc_line; | 1823 | struct lrc_line *lrc_line; |
1853 | int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; | 1824 | int y, ypos = 0, nblines = vp_lyrics[i].height/font_ui_height; |
1854 | y = (nblines-1)/2; | 1825 | y = (nblines-1)/2; |
@@ -1895,7 +1866,7 @@ static void display_lrcs(void) | |||
1895 | } | 1866 | } |
1896 | if (!lrc_line && ypos < vp_lyrics[i].height) | 1867 | if (!lrc_line && ypos < vp_lyrics[i].height) |
1897 | display->putsxy(0, ypos, "[end]"); | 1868 | display->putsxy(0, ypos, "[end]"); |
1898 | #endif /* HAVE_LCD_BITMAP */ | 1869 | |
1899 | display->update_viewport(); | 1870 | display->update_viewport(); |
1900 | display->set_viewport(NULL); | 1871 | display->set_viewport(NULL); |
1901 | } | 1872 | } |
@@ -2191,7 +2162,6 @@ static void load_or_save_settings(bool save) | |||
2191 | { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color }, | 2162 | { TYPE_INT, 0, 0xffffff, { .int_p = &prefs.inactive_color }, |
2192 | "inactive color", NULL }, | 2163 | "inactive color", NULL }, |
2193 | #endif | 2164 | #endif |
2194 | #ifdef HAVE_LCD_BITMAP | ||
2195 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL }, | 2165 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wrap }, "wrap", NULL }, |
2196 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, | 2166 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.wipe }, "wipe", NULL }, |
2197 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, | 2167 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.active_one_line }, |
@@ -2201,7 +2171,6 @@ static void load_or_save_settings(bool save) | |||
2201 | "statusbar on", NULL }, | 2171 | "statusbar on", NULL }, |
2202 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, | 2172 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_title }, |
2203 | "display title", NULL }, | 2173 | "display title", NULL }, |
2204 | #endif | ||
2205 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, | 2174 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.display_time }, |
2206 | "display time", NULL }, | 2175 | "display time", NULL }, |
2207 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on }, | 2176 | { TYPE_BOOL, 0, 1, { .bool_p = &prefs.backlight_on }, |
@@ -2223,14 +2192,12 @@ static void load_or_save_settings(bool save) | |||
2223 | prefs.active_color = rb->lcd_get_foreground(); | 2192 | prefs.active_color = rb->lcd_get_foreground(); |
2224 | prefs.inactive_color = LCD_LIGHTGRAY; | 2193 | prefs.inactive_color = LCD_LIGHTGRAY; |
2225 | #endif | 2194 | #endif |
2226 | #ifdef HAVE_LCD_BITMAP | ||
2227 | prefs.wrap = true; | 2195 | prefs.wrap = true; |
2228 | prefs.wipe = true; | 2196 | prefs.wipe = true; |
2229 | prefs.active_one_line = false; | 2197 | prefs.active_one_line = false; |
2230 | prefs.align = 1; /* center */ | 2198 | prefs.align = 1; /* center */ |
2231 | prefs.statusbar_on = false; | 2199 | prefs.statusbar_on = false; |
2232 | prefs.display_title = true; | 2200 | prefs.display_title = true; |
2233 | #endif | ||
2234 | prefs.display_time = true; | 2201 | prefs.display_time = true; |
2235 | prefs.backlight_on = false; | 2202 | prefs.backlight_on = false; |
2236 | #ifdef LRC_SUPPORT_ID3 | 2203 | #ifdef LRC_SUPPORT_ID3 |
@@ -2252,10 +2219,8 @@ static void load_or_save_settings(bool save) | |||
2252 | static bool lrc_theme_menu(void) | 2219 | static bool lrc_theme_menu(void) |
2253 | { | 2220 | { |
2254 | enum { | 2221 | enum { |
2255 | #ifdef HAVE_LCD_BITMAP | ||
2256 | LRC_MENU_STATUSBAR, | 2222 | LRC_MENU_STATUSBAR, |
2257 | LRC_MENU_DISP_TITLE, | 2223 | LRC_MENU_DISP_TITLE, |
2258 | #endif | ||
2259 | LRC_MENU_DISP_TIME, | 2224 | LRC_MENU_DISP_TIME, |
2260 | #ifdef HAVE_LCD_COLOR | 2225 | #ifdef HAVE_LCD_COLOR |
2261 | LRC_MENU_INACTIVE_COLOR, | 2226 | LRC_MENU_INACTIVE_COLOR, |
@@ -2267,9 +2232,7 @@ static bool lrc_theme_menu(void) | |||
2267 | bool exit = false, usb = false; | 2232 | bool exit = false, usb = false; |
2268 | 2233 | ||
2269 | MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, | 2234 | MENUITEM_STRINGLIST(menu, "Theme Settings", NULL, |
2270 | #ifdef HAVE_LCD_BITMAP | ||
2271 | "Show Statusbar", "Display Title", | 2235 | "Show Statusbar", "Display Title", |
2272 | #endif | ||
2273 | "Display Time", | 2236 | "Display Time", |
2274 | #ifdef HAVE_LCD_COLOR | 2237 | #ifdef HAVE_LCD_COLOR |
2275 | "Inactive Colour", | 2238 | "Inactive Colour", |
@@ -2280,14 +2243,12 @@ static bool lrc_theme_menu(void) | |||
2280 | { | 2243 | { |
2281 | switch (rb->do_menu(&menu, &selected, NULL, false)) | 2244 | switch (rb->do_menu(&menu, &selected, NULL, false)) |
2282 | { | 2245 | { |
2283 | #ifdef HAVE_LCD_BITMAP | ||
2284 | case LRC_MENU_STATUSBAR: | 2246 | case LRC_MENU_STATUSBAR: |
2285 | usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); | 2247 | usb = rb->set_bool("Show Statusbar", &prefs.statusbar_on); |
2286 | break; | 2248 | break; |
2287 | case LRC_MENU_DISP_TITLE: | 2249 | case LRC_MENU_DISP_TITLE: |
2288 | usb = rb->set_bool("Display Title", &prefs.display_title); | 2250 | usb = rb->set_bool("Display Title", &prefs.display_title); |
2289 | break; | 2251 | break; |
2290 | #endif | ||
2291 | case LRC_MENU_DISP_TIME: | 2252 | case LRC_MENU_DISP_TIME: |
2292 | usb = rb->set_bool("Display Time", &prefs.display_time); | 2253 | usb = rb->set_bool("Display Time", &prefs.display_time); |
2293 | break; | 2254 | break; |
@@ -2312,7 +2273,6 @@ static bool lrc_theme_menu(void) | |||
2312 | return usb; | 2273 | return usb; |
2313 | } | 2274 | } |
2314 | 2275 | ||
2315 | #ifdef HAVE_LCD_BITMAP | ||
2316 | static bool lrc_display_menu(void) | 2276 | static bool lrc_display_menu(void) |
2317 | { | 2277 | { |
2318 | enum { | 2278 | enum { |
@@ -2362,7 +2322,6 @@ static bool lrc_display_menu(void) | |||
2362 | 2322 | ||
2363 | return usb; | 2323 | return usb; |
2364 | } | 2324 | } |
2365 | #endif /* HAVE_LCD_BITMAP */ | ||
2366 | 2325 | ||
2367 | static bool lrc_lyrics_menu(void) | 2326 | static bool lrc_lyrics_menu(void) |
2368 | { | 2327 | { |
@@ -2489,9 +2448,7 @@ static int lrc_menu(void) | |||
2489 | { | 2448 | { |
2490 | enum { | 2449 | enum { |
2491 | LRC_MENU_THEME, | 2450 | LRC_MENU_THEME, |
2492 | #ifdef HAVE_LCD_BITMAP | ||
2493 | LRC_MENU_DISPLAY, | 2451 | LRC_MENU_DISPLAY, |
2494 | #endif | ||
2495 | LRC_MENU_LYRICS, | 2452 | LRC_MENU_LYRICS, |
2496 | LRC_MENU_PLAYBACK, | 2453 | LRC_MENU_PLAYBACK, |
2497 | #ifdef LRC_DEBUG | 2454 | #ifdef LRC_DEBUG |
@@ -2504,9 +2461,7 @@ static int lrc_menu(void) | |||
2504 | 2461 | ||
2505 | MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, | 2462 | MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, |
2506 | "Theme Settings", | 2463 | "Theme Settings", |
2507 | #ifdef HAVE_LCD_BITMAP | ||
2508 | "Display Settings", | 2464 | "Display Settings", |
2509 | #endif | ||
2510 | "Lyrics Settings", | 2465 | "Lyrics Settings", |
2511 | "Playback Control", | 2466 | "Playback Control", |
2512 | #ifdef LRC_DEBUG | 2467 | #ifdef LRC_DEBUG |
@@ -2524,11 +2479,9 @@ static int lrc_menu(void) | |||
2524 | case LRC_MENU_THEME: | 2479 | case LRC_MENU_THEME: |
2525 | usb = lrc_theme_menu(); | 2480 | usb = lrc_theme_menu(); |
2526 | break; | 2481 | break; |
2527 | #ifdef HAVE_LCD_BITMAP | ||
2528 | case LRC_MENU_DISPLAY: | 2482 | case LRC_MENU_DISPLAY: |
2529 | usb = lrc_display_menu(); | 2483 | usb = lrc_display_menu(); |
2530 | break; | 2484 | break; |
2531 | #endif | ||
2532 | case LRC_MENU_LYRICS: | 2485 | case LRC_MENU_LYRICS: |
2533 | usb = lrc_lyrics_menu(); | 2486 | usb = lrc_lyrics_menu(); |
2534 | break; | 2487 | break; |
@@ -2720,40 +2673,27 @@ static int lrc_main(void) | |||
2720 | long id3_timeout = 0; | 2673 | long id3_timeout = 0; |
2721 | bool update_display_state = true; | 2674 | bool update_display_state = true; |
2722 | 2675 | ||
2723 | #ifdef HAVE_LCD_BITMAP | ||
2724 | /* y offset of vp_lyrics */ | 2676 | /* y offset of vp_lyrics */ |
2725 | int h = (prefs.display_title?font_ui_height:0)+ | 2677 | int h = (prefs.display_title?font_ui_height:0)+ |
2726 | (prefs.display_time?SYSFONT_HEIGHT*2:0); | 2678 | (prefs.display_time?SYSFONT_HEIGHT*2:0); |
2727 | 2679 | ||
2728 | #endif | ||
2729 | 2680 | ||
2730 | FOR_NB_SCREENS(i) | 2681 | FOR_NB_SCREENS(i) |
2731 | { | 2682 | { |
2732 | #ifdef HAVE_LCD_BITMAP | ||
2733 | rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); | 2683 | rb->viewportmanager_theme_enable(i, prefs.statusbar_on, &vp_info[i]); |
2734 | vp_lyrics[i] = vp_info[i]; | 2684 | vp_lyrics[i] = vp_info[i]; |
2735 | vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; | 2685 | vp_lyrics[i].flags &= ~VP_FLAG_ALIGNMENT_MASK; |
2736 | vp_lyrics[i].y += h; | 2686 | vp_lyrics[i].y += h; |
2737 | vp_lyrics[i].height -= h; | 2687 | vp_lyrics[i].height -= h; |
2738 | #else | ||
2739 | rb->viewport_set_defaults(&vp_lyrics[i], i); | ||
2740 | if (prefs.display_time) | ||
2741 | { | ||
2742 | vp_lyrics[i].y += 1; /* time */ | ||
2743 | vp_lyrics[i].height -= 1; | ||
2744 | } | ||
2745 | #endif | ||
2746 | } | 2688 | } |
2747 | 2689 | ||
2748 | if (prefs.backlight_on) | 2690 | if (prefs.backlight_on) |
2749 | backlight_ignore_timeout(); | 2691 | backlight_ignore_timeout(); |
2750 | 2692 | ||
2751 | #ifdef HAVE_LCD_BITMAP | 2693 | /* in case settings that may affect break position |
2752 | /* in case settings that may affect break position | ||
2753 | * are changed (statusbar_on and wrap). */ | 2694 | * are changed (statusbar_on and wrap). */ |
2754 | if (!current.too_many_lines) | 2695 | if (!current.too_many_lines) |
2755 | calc_brpos(NULL, 0); | 2696 | calc_brpos(NULL, 0); |
2756 | #endif | ||
2757 | 2697 | ||
2758 | while (ret == LRC_GOTO_MAIN) | 2698 | while (ret == LRC_GOTO_MAIN) |
2759 | { | 2699 | { |
@@ -2819,12 +2759,10 @@ static int lrc_main(void) | |||
2819 | } | 2759 | } |
2820 | if (update_display_state) | 2760 | if (update_display_state) |
2821 | { | 2761 | { |
2822 | #ifdef HAVE_LCD_BITMAP | ||
2823 | if (current.type == TXT || current.type == ID3_USLT) | 2762 | if (current.type == TXT || current.type == ID3_USLT) |
2824 | current.wipe = false; | 2763 | current.wipe = false; |
2825 | else | 2764 | else |
2826 | current.wipe = prefs.wipe; | 2765 | current.wipe = prefs.wipe; |
2827 | #endif | ||
2828 | display_state(); | 2766 | display_state(); |
2829 | update_display_state = false; | 2767 | update_display_state = false; |
2830 | } | 2768 | } |
@@ -2839,10 +2777,9 @@ static int lrc_main(void) | |||
2839 | ret = handle_button(); | 2777 | ret = handle_button(); |
2840 | } | 2778 | } |
2841 | 2779 | ||
2842 | #ifdef HAVE_LCD_BITMAP | ||
2843 | FOR_NB_SCREENS(i) | 2780 | FOR_NB_SCREENS(i) |
2844 | rb->viewportmanager_theme_undo(i, false); | 2781 | rb->viewportmanager_theme_undo(i, false); |
2845 | #endif | 2782 | |
2846 | if (prefs.backlight_on) | 2783 | if (prefs.backlight_on) |
2847 | backlight_use_settings(); | 2784 | backlight_use_settings(); |
2848 | 2785 | ||
@@ -2857,10 +2794,8 @@ enum plugin_status plugin_start(const void* parameter) | |||
2857 | /* initialize settings. */ | 2794 | /* initialize settings. */ |
2858 | load_or_save_settings(false); | 2795 | load_or_save_settings(false); |
2859 | 2796 | ||
2860 | #ifdef HAVE_LCD_BITMAP | ||
2861 | uifont = rb->screens[0]->getuifont(); | 2797 | uifont = rb->screens[0]->getuifont(); |
2862 | font_ui_height = rb->font_get(uifont)->height; | 2798 | font_ui_height = rb->font_get(uifont)->height; |
2863 | #endif | ||
2864 | 2799 | ||
2865 | lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); | 2800 | lrc_buffer = rb->plugin_get_buffer(&lrc_buffer_size); |
2866 | lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */ | 2801 | lrc_buffer = ALIGN_UP(lrc_buffer, 4); /* 4 bytes aligned */ |