Index: apps/cuesheet.c =================================================================== --- apps/cuesheet.c (revision 24098) +++ apps/cuesheet.c (working copy) @@ -39,6 +39,7 @@ #include "plugin.h" #include "playback.h" #include "cuesheet.h" +#include "gui/wps.h" #define CUE_DIR ROCKBOX_DIR "/cue" @@ -328,7 +329,18 @@ else { if (!(direction <= 0 && track == 0)) - track += direction; + { + /* If skipping forward, skip to next cuesheet segment. If skipping + backward before DEFAULT_SKIP_TRESH milliseconds have elapsed, skip + to previous cuesheet segment. If skipping backward after + DEFAULT_SKIP_TRESH seconds have elapsed, skip to the start of the + current cuesheet segment */ + if (direction == 1 || + ((curr_pos - cue->tracks[track].offset) < DEFAULT_SKIP_TRESH)) + { + track += direction; + } + } seek(cue->tracks[track].offset); return true; Index: apps/gui/wps.c =================================================================== --- apps/gui/wps.c (revision 24098) +++ apps/gui/wps.c (working copy) @@ -70,10 +70,7 @@ #define RESTORE_WPS_INSTANTLY 0l #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) -/* in milliseconds */ -#define DEFAULT_SKIP_TRESH 3000l - #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ /* 3% of 30min file == 54s step size */ #define MIN_FF_REWIND_STEP 500 Index: apps/gui/wps.h =================================================================== --- apps/gui/wps.h (revision 24098) +++ apps/gui/wps.h (working copy) @@ -43,4 +43,7 @@ int wps_get_ff_rewind_count(void); #endif /* IPOD_ACCESSORY_PROTOCOL */ +/* in milliseconds */ +#define DEFAULT_SKIP_TRESH 3000l + #endif /* _WPS_H_ */