diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/wps.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index b4ffe2a88b..39d71c8464 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -546,10 +546,20 @@ static void next_track(void) | |||
546 | static void play_hop(int direction) | 546 | static void play_hop(int direction) |
547 | { | 547 | { |
548 | struct wps_state *state = skin_get_global_state(); | 548 | struct wps_state *state = skin_get_global_state(); |
549 | struct cuesheet *cue = state->id3->cuesheet; | ||
549 | long step = global_settings.skip_length*1000; | 550 | long step = global_settings.skip_length*1000; |
550 | long elapsed = state->id3->elapsed; | 551 | long elapsed = state->id3->elapsed; |
551 | long remaining = state->id3->length - elapsed; | 552 | long remaining = state->id3->length - elapsed; |
552 | 553 | ||
554 | /* if cuesheet is active, then we want the current tracks end instead of | ||
555 | * the total end */ | ||
556 | if (cue && (cue->curr_track_idx+1 < cue->track_count)) | ||
557 | { | ||
558 | int next = cue->curr_track_idx+1; | ||
559 | struct cue_track_info *t = &cue->tracks[next]; | ||
560 | remaining = t->offset - elapsed; | ||
561 | } | ||
562 | |||
553 | if (step < 0) | 563 | if (step < 0) |
554 | { | 564 | { |
555 | if (direction < 0) | 565 | if (direction < 0) |