misc: shutdown: fix backdrop glitches

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Fri, 5 Jun 2026 20:20:07 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit f123dbc04ad8aeab45faf32c22806820d56880bb
Author: Christian Soffke <[email protected]>
Date:   Sat May 30 02:12:03 2026 +0200

    misc: shutdown: fix backdrop glitches
    
    Clearing the display makes the backdrop come to the foreground.
    which can look odd or glitchy, particularly for themes that do
    custom drawing on the backdrop buffer (2c71aa9). It also causes
    issues if the shutdown has to be canceled.
    
    Instead, enable theme, then clear the UI vp.
    
    Change-Id: Ia96d1e766a9b86ec133522f7cd259e8b88f64216

diff --git a/apps/misc.c b/apps/misc.c
index f7fa794979..ea4726d0c2 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -373,10 +373,13 @@ static bool clean_shutdown(enum shutdown_type sd_type,
         int audio_stat = audio_status();
 #endif
 
+        FOR_NB_SCREENS(i)
+            viewportmanager_theme_enable(i, true, NULL);
+        clear_screen_buffer(false);
         FOR_NB_SCREENS(i)
         {
-            screens[i].clear_display();
             screens[i].update();
+            screens[i].scroll_stop();
         }
 
         if (batt_safe)
@@ -387,6 +390,8 @@ static bool clean_shutdown(enum shutdown_type sd_type,
             {
                 cancel_shutdown();
                 splash(HZ, ID2P(LANG_TAGCACHE_BUSY));
+                FOR_NB_SCREENS(i)
+                    viewportmanager_theme_undo(i, false);
                 return false;
             }
 #endif
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs