splash: make iPod reFresh colour workaround pixel-format independent

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 2c5482cab938357d4eac436333b06f7082d306c4
Author: neofright <[email protected]>
Date:   Wed Aug 19 18:30:48 2026 +0100

    splash: make iPod reFresh colour workaround pixel-format independent
    
    The splash contrast workaround for the iPod reFresh themes compares
    foreground and background colours against hard-coded RGB565 values.
    
    This prevents the workaround from being applied on targets using other
    pixel formats, such as XRGB8888 hosted targets.
    
    Use LCD_RGBPACK() and SCREEN_COLOR_TO_NATIVE() to obtain the equivalent
    colours for the active screen instead.
    
    Code change and commit message generated by GPT-5.6 Sol. Compiled on
    my hosted Eros Q build and confirmed working correctly.
    
    Change-Id: Id15669bc7b8cec11bd4ee645c0b671db4499d2cd

diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index 8619d36265..fd680eac87 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -306,7 +306,10 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap,
         bg = screen->get_background();
 
         broken = (fg == bg) ||
-                 (bg == 63422 && fg == 65535); /* -> iPod reFresh themes from '22 */
+                 (bg == SCREEN_COLOR_TO_NATIVE(screen,
+                                               LCD_RGBPACK(244, 244, 244)) &&
+                  fg == SCREEN_COLOR_TO_NATIVE(screen,
+                                               LCD_RGBPACK(255, 255, 255)));
 
         vp->drawmode = DRMODE_FG;
         /* can't do vp->fg_pattern here, since set_foreground does a bit more on
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.