summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-04-05 19:29:21 +0000
committerAlexander Levin <al.le@rockbox.org>2009-04-05 19:29:21 +0000
commitbe7f5253a1dfa51455a092bb08c0b1d7d633b2b3 (patch)
tree6d2d3beac611f95cf5875a9e036a86feabcee15a
parent9def6b23450ea17d12fec9b9ea3c9ecfa62a8fb1 (diff)
downloadrockbox-be7f5253a1dfa51455a092bb08c0b1d7d633b2b3.tar.gz
rockbox-be7f5253a1dfa51455a092bb08c0b1d7d633b2b3.tar.bz2
rockbox-be7f5253a1dfa51455a092bb08c0b1d7d633b2b3.zip
Fix hopping backwards if skip length is > 0 and we're near the end of the track (less than skip length)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20631 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 87912dda30..8256fee84f 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -146,8 +146,10 @@ static void play_hop(int direction)
unsigned long elapsed = wps_state.id3->elapsed;
unsigned long remaining = wps_state.id3->length - elapsed;
- if (!global_settings.prevent_skip
- && (!step || (step >= remaining || (direction < 0 && elapsed < DEFAULT_SKIP_TRESH))))
+ if (!global_settings.prevent_skip &&
+ (!step ||
+ (direction > 0 && step >= remaining) ||
+ (direction < 0 && elapsed < DEFAULT_SKIP_TRESH)))
{ /* Do normal track skipping */
if (direction > 0)
next_track();