From 523c51a94436fb2947930daa7b583d35ddfc1750 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 8 Aug 2002 21:12:09 +0000 Subject: Allow reverse playlist wrap in repeat mode git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1626 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/playlist.c b/apps/playlist.c index f4626356cb..cbd8eeb6a2 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -78,8 +78,12 @@ char* playlist_next(int steps) char *dir_end; playlist.index = (playlist.index+steps) % playlist.amount; - if ( playlist.index < 0 ) - playlist.index = 0; + if ( playlist.index < 0 ) { + if ( global_settings.loop_playlist ) + playlist.index += playlist.amount; + else + playlist.index = 0; + } seek = playlist.indices[playlist.index]; if(playlist.in_ram) -- cgit v1.2.3