1
0
Fork 0
forked from len0rd/rockbox

[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
This commit is contained in:
Solomon Peachy 2020-07-17 10:31:31 -04:00
parent 8cb555460f
commit 658026e626
240 changed files with 288 additions and 1759 deletions

View file

@ -39,9 +39,7 @@ static bool wait_key_press(void)
bool display_text(unsigned short words, char** text, struct style_text* style,
struct viewport* vp_text, bool wait_key)
{
#ifdef HAVE_LCD_BITMAP
int prev_drawmode;
#endif
#ifdef HAVE_LCD_COLOR
int standard_fgcolor;
#endif
@ -55,10 +53,8 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
vp_height = vp_text->height;
}
rb->screens[SCREEN_MAIN]->set_viewport(vp_text);
#ifdef HAVE_LCD_BITMAP
prev_drawmode = rb->lcd_get_drawmode();
rb->lcd_set_drawmode(DRMODE_SOLID);
#endif
#ifdef HAVE_LCD_COLOR
standard_fgcolor = rb->lcd_get_foreground();
#endif
@ -121,11 +117,9 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
#endif
rb->lcd_putsxy(x, y, text[i]);
/* underline the word */
#ifdef HAVE_LCD_BITMAP
if (style[style_index].flags&TEXT_UNDERLINE) {
rb->lcd_hline(x, x+width, y+height-1);
}
#endif
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(standard_fgcolor);
#endif
@ -134,9 +128,7 @@ bool display_text(unsigned short words, char** text, struct style_text* style,
x += width + space_w;
}
rb->screens[SCREEN_MAIN]->update_viewport();
#ifdef HAVE_LCD_BITMAP
rb->lcd_set_drawmode(prev_drawmode);
#endif
if (wait_key)
{
if (wait_key_press())