forked from len0rd/rockbox
More visual annoyance fixes. Backdrops no longer show though on centered splash screens.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11213 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3a8ad7fe7e
commit
e627e35439
1 changed files with 19 additions and 11 deletions
|
|
@ -56,7 +56,6 @@ static void splash(struct screen * screen, bool center,
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int maxw = 0;
|
int maxw = 0;
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
unsigned prevbg = 0;
|
|
||||||
unsigned prevfg = 0;
|
unsigned prevfg = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -132,18 +131,27 @@ static void splash(struct screen * screen, bool center,
|
||||||
{
|
{
|
||||||
y = (screen->height - y) / 2; /* height => y start position */
|
y = (screen->height - y) / 2; /* height => y start position */
|
||||||
x = (screen->width - maxw) / 2 - 2;
|
x = (screen->width - maxw) / 2 - 2;
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
if (screen->depth > 1)
|
if (screen->depth > 1)
|
||||||
{
|
{
|
||||||
prevbg = screen->get_background();
|
|
||||||
prevfg = screen->get_foreground();
|
prevfg = screen->get_foreground();
|
||||||
screen->set_background(LCD_LIGHTGRAY);
|
screen->set_drawmode(DRMODE_FG);
|
||||||
screen->set_foreground(LCD_BLACK);
|
screen->set_foreground(LCD_LIGHTGRAY);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||||
|
|
||||||
screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4);
|
screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4);
|
||||||
screen->set_drawmode(DRMODE_SOLID);
|
|
||||||
|
#if LCD_DEPTH > 1
|
||||||
|
if (screen->depth > 1)
|
||||||
|
screen->set_foreground(LCD_BLACK);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
screen->set_drawmode(DRMODE_SOLID);
|
||||||
|
|
||||||
screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4);
|
screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -174,10 +182,10 @@ static void splash(struct screen * screen, bool center,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
|
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
|
||||||
if (center && (screen->depth > 1))
|
if (center && screen->depth > 1)
|
||||||
{
|
{
|
||||||
screen->set_background(prevbg);
|
|
||||||
screen->set_foreground(prevfg);
|
screen->set_foreground(prevfg);
|
||||||
|
screen->set_drawmode(DRMODE_SOLID);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
|
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue