quickscreen: fix missing redraw for QS_VOL action

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 9cd4352256e3a74a13d090f5fca8302e5b5bb136
Author: Christian Soffke <[email protected]>
Date:   Mon Aug 17 05:07:21 2026 +0200

    quickscreen: fix missing redraw for QS_VOL action
    
    If volume was set as one of the Quickscreen items,
    the value wasn't updated when pressing ACTION_QS_VOLUP
    or -DOWN.
    
    Change-Id: Ie6531535745592d7b53006560f1db8c5b7dbfb97

diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 45a0552809..083bebe06e 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -58,6 +58,7 @@ struct quickscreen
     struct viewport vp_icons[NB_SCREENS];
     int button_enter;
     enum quickscreen_return result;
+    enum quickscreen_item volume_item;
 };
 
 static void quickscreen_fix_viewports(struct quickscreen *qs, enum screen_type screen)
@@ -438,10 +439,12 @@ static void quickscreen_run(struct quickscreen * qs)
         }
         else if (button == qs->button_enter)
             can_quit = true;
-        else if (button == ACTION_QS_VOLUP)
-            adjust_volume(1);
-        else if (button == ACTION_QS_VOLDOWN)
-            adjust_volume(-1);
+        else if (button == ACTION_QS_VOLUP || button == ACTION_QS_VOLDOWN)
+        {
+            adjust_volume(button == ACTION_QS_VOLUP ? 1 : -1);
+            if (qs->volume_item < QUICKSCREEN_ITEM_COUNT)
+                quickscreen_update(qs, qs->volume_item);
+        }
         else if (button == ACTION_STD_CONTEXT)
         {
             qs->result |= QUICKSCREEN_GOTO_SHORTCUTS_MENU;
@@ -467,6 +470,7 @@ int quick_screen_quick(int button_enter)
     struct quickscreen qs;
     qs.button_enter = button_enter;
     qs.result = QUICKSCREEN_OK;
+    qs.volume_item = QUICKSCREEN_ITEM_COUNT;
 
     for (int i = 0; i < 4; ++i)
     {
@@ -474,6 +478,9 @@ int quick_screen_quick(int button_enter)
 
         if (!is_setting_quickscreenable(qs.items[i]))
             qs.items[i] = NULL;
+
+        if (qs.items[i] && qs.items[i]->lang_id == LANG_VOLUME)
+            qs.volume_item = i;
     }
 
     quickscreen_run(&qs);
-- 
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.