Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

touchscreen: Fix seeking to end of track in WPS

Seeking to the very end of the track with the touchscreen caused
rapid skipping through the playlist because each touch event
generates a separate seek operation, kind of like rapidly pressing
a physical button. Fix this bug by executing the seek operation
only for the release event.

Change-Id: Ic1080065a68e7cc2ba98e2f27293c954f2ec8fb2

+21 -3
+2
apps/action.h
··· 303 303 ACTION_TOUCH_REPMODE, 304 304 ACTION_TOUCH_MUTE, 305 305 ACTION_TOUCH_SCROLLBAR, 306 + ACTION_TOUCH_SCROLLBAR_SET, 307 + ACTION_TOUCH_SCROLLBAR_END, 306 308 ACTION_TOUCH_VOLUME, 307 309 ACTION_TOUCH_SOFTLOCK, 308 310 ACTION_TOUCH_SETTING,
+12 -3
apps/gui/skin_engine/skin_touchsupport.c
··· 103 103 case ACTION_TOUCH_SCROLLBAR: 104 104 case ACTION_TOUCH_VOLUME: 105 105 case ACTION_TOUCH_SETTING: 106 - /* we need something press-like */ 106 + /* accept taps and drags, ignore the rest */ 107 107 if (!(gevent.id == GESTURE_TAP || 108 - gevent.id == GESTURE_LONG_PRESS || 109 108 gevent.id == GESTURE_HOLD || 110 109 gevent.id == GESTURE_DRAGSTART || 111 - gevent.id == GESTURE_DRAG)) 110 + gevent.id == GESTURE_DRAG || 111 + gevent.id == GESTURE_RELEASE)) 112 112 break; 113 113 114 114 if (edge_offset) ··· 194 194 195 195 switch (action) 196 196 { 197 + case ACTION_TOUCH_SCROLLBAR: 198 + if (gevent.id == GESTURE_HOLD || 199 + gevent.id == GESTURE_DRAGSTART || 200 + gevent.id == GESTURE_DRAG) 201 + action = ACTION_TOUCH_SCROLLBAR_SET; 202 + else if (gevent.id == GESTURE_RELEASE) 203 + action = ACTION_TOUCH_SCROLLBAR_END; 204 + break; 205 + 197 206 case ACTION_TOUCH_SOFTLOCK: 198 207 data->touchscreen_locked = !data->touchscreen_locked; 199 208 action = ACTION_NONE;
+7
apps/gui/wps.c
··· 193 193 case ACTION_STD_HOTKEY: 194 194 return ACTION_WPS_HOTKEY; 195 195 #endif 196 + case ACTION_TOUCH_SCROLLBAR_SET: 197 + audio_pre_ff_rewind(); 198 + gstate->id3->elapsed = gstate->id3->length*offset/1000; 199 + return ACTION_TOUCHSCREEN; 200 + case ACTION_TOUCH_SCROLLBAR_END: 201 + audio_ff_rewind(gstate->id3->elapsed); 202 + return ACTION_TOUCHSCREEN; 196 203 case ACTION_TOUCH_SCROLLBAR: 197 204 gstate->id3->elapsed = gstate->id3->length*offset/1000; 198 205 audio_pre_ff_rewind();