diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-10-13 11:53:57 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-10-13 11:53:57 +0000 |
commit | e627e3543952975a08f184048e5fb458c5b31dd3 (patch) | |
tree | 050dc1a937913964fdcff8b39648f15a6d35cc58 /apps/gui/splash.c | |
parent | 3a8ad7fe7ea1f6b1ee72824b8c903c5e4f09e4f1 (diff) | |
download | rockbox-e627e3543952975a08f184048e5fb458c5b31dd3.tar.gz rockbox-e627e3543952975a08f184048e5fb458c5b31dd3.zip |
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
Diffstat (limited to 'apps/gui/splash.c')
-rw-r--r-- | apps/gui/splash.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 0995968415..1f04b89fc0 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | static void splash(struct screen * screen, bool center, | 42 | static void splash(struct screen * screen, bool center, |
43 | const char *fmt, va_list ap) | 43 | const char *fmt, va_list ap) |
44 | { | 44 | { |
45 | char splash_buf[MAXBUFFER]; | 45 | char splash_buf[MAXBUFFER]; |
@@ -56,7 +56,6 @@ static void splash(struct screen * screen, bool center, | |||
56 | #ifdef HAVE_LCD_BITMAP | 56 | #ifdef HAVE_LCD_BITMAP |
57 | int maxw = 0; | 57 | int maxw = 0; |
58 | #if LCD_DEPTH > 1 | 58 | #if LCD_DEPTH > 1 |
59 | unsigned prevbg = 0; | ||
60 | unsigned prevfg = 0; | 59 | unsigned prevfg = 0; |
61 | #endif | 60 | #endif |
62 | 61 | ||
@@ -64,7 +63,7 @@ static void splash(struct screen * screen, bool center, | |||
64 | #else /* HAVE_LCD_CHARCELLS */ | 63 | #else /* HAVE_LCD_CHARCELLS */ |
65 | 64 | ||
66 | space_w = h = 1; | 65 | space_w = h = 1; |
67 | screen->double_height (false); | 66 | screen->double_height (false); |
68 | #endif | 67 | #endif |
69 | y = h; | 68 | y = h; |
70 | 69 | ||
@@ -76,7 +75,7 @@ static void splash(struct screen * screen, bool center, | |||
76 | next = strtok_r(splash_buf, " ", &store); | 75 | next = strtok_r(splash_buf, " ", &store); |
77 | if (!next) | 76 | if (!next) |
78 | return; /* nothing to display */ | 77 | return; /* nothing to display */ |
79 | 78 | ||
80 | lines[0] = next; | 79 | lines[0] = next; |
81 | while (true) | 80 | while (true) |
82 | { | 81 | { |
@@ -132,18 +131,27 @@ static void splash(struct screen * screen, bool center, | |||
132 | { | 131 | { |
133 | y = (screen->height - y) / 2; /* height => y start position */ | 132 | y = (screen->height - y) / 2; /* height => y start position */ |
134 | x = (screen->width - maxw) / 2 - 2; | 133 | x = (screen->width - maxw) / 2 - 2; |
134 | |||
135 | #if LCD_DEPTH > 1 | 135 | #if LCD_DEPTH > 1 |
136 | if (screen->depth > 1) | 136 | if (screen->depth > 1) |
137 | { | 137 | { |
138 | prevbg = screen->get_background(); | ||
139 | prevfg = screen->get_foreground(); | 138 | prevfg = screen->get_foreground(); |
140 | screen->set_background(LCD_LIGHTGRAY); | 139 | screen->set_drawmode(DRMODE_FG); |
141 | screen->set_foreground(LCD_BLACK); | 140 | screen->set_foreground(LCD_LIGHTGRAY); |
142 | } | 141 | } |
142 | else | ||
143 | #endif | 143 | #endif |
144 | screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 144 | screen->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
145 | |||
145 | screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4); | 146 | screen->fillrect(x, y-2, maxw+4, screen->height-y*2+4); |
146 | screen->set_drawmode(DRMODE_SOLID); | 147 | |
148 | #if LCD_DEPTH > 1 | ||
149 | if (screen->depth > 1) | ||
150 | screen->set_foreground(LCD_BLACK); | ||
151 | else | ||
152 | #endif | ||
153 | screen->set_drawmode(DRMODE_SOLID); | ||
154 | |||
147 | screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4); | 155 | screen->drawrect(x, y-2, maxw+4, screen->height-y*2+4); |
148 | } | 156 | } |
149 | else | 157 | else |
@@ -174,10 +182,10 @@ static void splash(struct screen * screen, bool center, | |||
174 | } | 182 | } |
175 | 183 | ||
176 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1) | 184 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1) |
177 | if (center && (screen->depth > 1)) | 185 | if (center && screen->depth > 1) |
178 | { | 186 | { |
179 | screen->set_background(prevbg); | ||
180 | screen->set_foreground(prevfg); | 187 | screen->set_foreground(prevfg); |
188 | screen->set_drawmode(DRMODE_SOLID); | ||
181 | } | 189 | } |
182 | #endif | 190 | #endif |
183 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | 191 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) |