diff options
author | roman.artiukhin <bahusdrive@gmail.com> | 2023-03-26 12:12:52 +0300 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2023-10-22 08:21:22 -0400 |
commit | 4fb37ecbc692fdbb2e46aeaccf411caf631f9699 (patch) | |
tree | f08d9d8c842b4cfff395927cecdd4951f1316ab5 /apps/gui | |
parent | 5c36643132a044dcc656dc0eae895e145bd932d0 (diff) | |
download | rockbox-4fb37ecbc692fdbb2e46aeaccf411caf631f9699.tar.gz rockbox-4fb37ecbc692fdbb2e46aeaccf411caf631f9699.zip |
Skip Length across tracks
Allows to use Prev button to skip length from the end of previous track.
Can be enabled with:
Settings -> Playback Settings -> Skip Length set to some time interval
and
Settings -> Playback Settings -> Rewind Across Tracks set to Yes
Change-Id: I99f234035a8a5acc9cbfe05ea83971ec5ddc59ea
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/wps.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 10c971fcc4..2a595f74e6 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -464,7 +464,21 @@ static void play_hop(int direction) | |||
464 | if (direction > 0) | 464 | if (direction > 0) |
465 | next_track(); | 465 | next_track(); |
466 | else if (direction < 0) | 466 | else if (direction < 0) |
467 | { | ||
468 | if (step > 0 && global_settings.rewind_across_tracks && elapsed < DEFAULT_SKIP_THRESH && playlist_check(-1)) | ||
469 | { | ||
470 | bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false; | ||
471 | if (!audio_paused) | ||
472 | audio_pause(); | ||
473 | audio_prev(); | ||
474 | audio_ff_rewind(-step); | ||
475 | if (!audio_paused) | ||
476 | audio_resume(); | ||
477 | return; | ||
478 | } | ||
479 | |||
467 | prev_track(DEFAULT_SKIP_THRESH); | 480 | prev_track(DEFAULT_SKIP_THRESH); |
481 | } | ||
468 | return; | 482 | return; |
469 | } | 483 | } |
470 | else if (direction == 1 && step >= remaining) | 484 | else if (direction == 1 && step >= remaining) |