summaryrefslogtreecommitdiffstats
path: root/apps/gui
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-02-02 22:00:56 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-02-02 22:00:56 +0000
commit0ecd0b0fc2450c3a51239af2970793124b7af5e1 (patch)
tree886063daab4ca07d3b9dc896c006501b51512d55 /apps/gui
parent33f2e28daa94fb8996822311fee4a596608638f7 (diff)
downloadrockbox-0ecd0b0fc2450c3a51239af2970793124b7af5e1.tar.gz
rockbox-0ecd0b0fc2450c3a51239af2970793124b7af5e1.tar.bz2
rockbox-0ecd0b0fc2450c3a51239af2970793124b7af5e1.zip
patch #1422861 by Adam Boot - Fix splash() color problems
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8541 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/splash.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index fffa520b4f..d04ef015b9 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -51,6 +51,10 @@ static void splash(struct screen * screen,
bool first=true;
#ifdef HAVE_LCD_BITMAP
int maxw=0;
+#if LCD_DEPTH > 1
+ unsigned prevbg = LCD_DEFAULT_BG;
+ unsigned prevfg = LCD_DEFAULT_FG;
+#endif
#endif
#ifdef HAVE_LCD_CHARCELLS
@@ -127,8 +131,12 @@ static void splash(struct screen * screen,
int xx = (screen->width-maxw)/2 - 2;
/* The new graphics routines handle clipping, so no need to check */
#if LCD_DEPTH > 1
- if(screen->depth>1)
+ if(screen->depth>1) {
+ prevbg = screen->get_background();
+ prevfg = screen->get_foreground();
screen->set_background(LCD_LIGHTGRAY);
+ screen->set_foreground(LCD_BLACK);
+ }
#endif
screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
screen->fillrect(xx, y-2, maxw+4, screen->height-y*2+4);
@@ -177,8 +185,10 @@ static void splash(struct screen * screen,
}
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
- if(screen->depth > 1)
- screen->set_background(LCD_DEFAULT_BG);
+ if(screen->depth > 1) {
+ screen->set_background(prevbg);
+ screen->set_foreground(prevfg);
+ }
#endif
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
screen->update();