action: touchscreen: fix stuck repeated state of last action

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sun, 31 May 2026 10:07:20 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 892fbe8d8f0164f15329cfbef789f4ae6881b604
Author: Roman Artiukhin <[email protected]>
Date:   Sun May 31 13:16:47 2026 +0300

    action: touchscreen: fix stuck repeated state of last action
    
    This fixes the repeat_mode being stuck on Repeat Shuffle on the Hiby R1 WPS, and quick settings values being stuck at the last values for touch actions.
    
    Regression from 9e254aca. The repeated state is used by the quick screen to detect repeated actions (see b918ec5) so I also removed "historical baggage" note.
    
    Change-Id: Ic2a97058bbd17d232954ffe37f31a480ee11fe54

diff --git a/apps/action.c b/apps/action.c
index c7dd74f60a..28c93603d9 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -430,6 +430,7 @@ static inline bool get_action_touchscreen(action_last_t *last, action_cur_t *cur
     {
         intptr_t data = button_get_data();
         long now = current_tick;
+        last->repeated = false;
 
         if (has_flag(last->button, BUTTON_TOUCHSCREEN) &&
             !has_flag(last->button, BUTTON_REL))
@@ -439,7 +440,6 @@ static inline bool get_action_touchscreen(action_last_t *last, action_cur_t *cur
             if (!has_flag(cur->button, BUTTON_REL))
                 last->ts_data = data;
 
-            /* Historical baggage... may be unnecessary. */
             if (has_flag(cur->button, BUTTON_REPEAT))
                 last->repeated = true;
         }
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs