summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2024-11-28 22:23:29 +0100
committerChristian Soffke <christian.soffke@gmail.com>2024-11-28 22:26:52 +0100
commitb1e70db6e77124651780ef03716723ed31d82e5c (patch)
treeca45b4df83396cbafbb59dd8caaf19ffab95768d
parentafb0e845cfafa3a22867e54bd737d4cfd7eb1506 (diff)
downloadrockbox-b1e70db6e7.tar.gz
rockbox-b1e70db6e7.zip
Fix FS#13523 splashf crash on devices with remote LCD
regression introduced in ff2f912 Change-Id: Ifc9f37710e379605ad3325679325aab229003a21
-rw-r--r--apps/gui/splash.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index ad901001ec..848a847e83 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -148,14 +148,17 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
vp->flags |= VP_FLAG_ALIGN_CENTER;
#if LCD_DEPTH > 1
- unsigned fg = screen->get_foreground();
- unsigned bg = screen->get_background();
-
- bool broken = (fg == bg) ||
- (bg == 63422 && fg == 65535); /* -> iPod reFresh themes from '22 */
+ unsigned fg = 0, bg = 0;
+ bool broken = false;
if (screen->depth > 1)
{
+ fg = screen->get_foreground();
+ bg = screen->get_background();
+
+ broken = (fg == bg) ||
+ (bg == 63422 && fg == 65535); /* -> iPod reFresh themes from '22 */
+
vp->drawmode = DRMODE_FG;
/* can't do vp->fg_pattern here, since set_foreground does a bit more on
* greyscale */