From e52dd43e048b1fb11d142dad59aee09fcb7f30c8 Mon Sep 17 00:00:00 2001 From: alle Date: Sun, 5 Apr 2009 19:29:21 +0000 Subject: [PATCH] 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 --- apps/gui/gwps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 87912dda3..8256fee84 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(); -- 2.11.4.GIT