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: Allow progress bars to be used in the .sbs

Progress bars (for seeking in the current track) can now be
used on the .sbs skin.

Change-Id: I42377b16036ca4ca8017ecfa2bdab08bd0fa1e64

+25 -17
+23 -3
apps/gui/skin_engine/skin_touchsupport.c
··· 33 33 #include "splash.h" 34 34 #include "playlist.h" 35 35 #include "dsp_misc.h" 36 + #include "playback.h" 36 37 37 38 /** Disarms all touchregions. */ 38 39 void skin_disarm_touchregions(struct gui_wps *gwps) ··· 195 196 switch (action) 196 197 { 197 198 case ACTION_TOUCH_SCROLLBAR: 199 + { 200 + action = ACTION_TOUCHSCREEN; 201 + 202 + struct wps_state* gwps = get_wps_state(); 203 + if (!gwps->id3) 204 + break; 205 + 198 206 if (gevent.id == GESTURE_HOLD || 199 207 gevent.id == GESTURE_DRAGSTART || 200 208 gevent.id == GESTURE_DRAG) 201 - action = ACTION_TOUCH_SCROLLBAR_SET; 209 + { 210 + audio_pre_ff_rewind(); 211 + gwps->id3->elapsed = gwps->id3->length * (*edge_offset) / 1000; 212 + } 202 213 else if (gevent.id == GESTURE_RELEASE) 203 - action = ACTION_TOUCH_SCROLLBAR_END; 204 - break; 214 + { 215 + audio_ff_rewind(gwps->id3->elapsed); 216 + } 217 + else 218 + { 219 + gwps->id3->elapsed = gwps->id3->length * (*edge_offset) / 1000; 220 + audio_pre_ff_rewind(); 221 + audio_ff_rewind(gwps->id3->elapsed); 222 + } 223 + 224 + } break; 205 225 206 226 case ACTION_TOUCH_VOLUME: 207 227 {
-13
apps/gui/wps.c
··· 170 170 static int skintouch_to_wps(void) 171 171 { 172 172 int offset = 0; 173 - struct wps_state *gstate = get_wps_state(); 174 173 struct gui_wps *gwps = skin_get_gwps(WPS, SCREEN_MAIN); 175 174 int button = skin_get_touchaction(gwps, &offset); 176 175 switch (button) ··· 193 192 case ACTION_STD_HOTKEY: 194 193 return ACTION_WPS_HOTKEY; 195 194 #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; 203 - case ACTION_TOUCH_SCROLLBAR: 204 - gstate->id3->elapsed = gstate->id3->length*offset/1000; 205 - audio_pre_ff_rewind(); 206 - audio_ff_rewind(gstate->id3->elapsed); 207 - return ACTION_TOUCHSCREEN; 208 195 } 209 196 return button; 210 197 }
+2 -1
apps/radio/radio_skin.c
··· 115 115 case ACTION_STD_MENU: 116 116 return ACTION_FM_MENU; 117 117 case ACTION_TOUCH_SCROLLBAR: 118 - /* TODO */ 118 + /* TODO - skin_get_touchaction has this hardcoded to seek in 119 + * current track, refactor it if this is ever implemented. */ 119 120 break; 120 121 } 121 122 #endif