From b1e70db6e77124651780ef03716723ed31d82e5c Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Thu, 28 Nov 2024 22:23:29 +0100 Subject: [PATCH] Fix FS#13523 splashf crash on devices with remote LCD regression introduced in ff2f912 Change-Id: Ifc9f37710e379605ad3325679325aab229003a21 --- apps/gui/splash.c | 13 ++++++++----- 1 file 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 */