From 9d860e19d2aedc9dc672a037b7c2de728dd6477e Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 11 Apr 2003 00:29:15 +0000 Subject: Better handling of next/prev git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3528 a1c6a512-1295-4272-9138-f99709370657 --- firmware/mpeg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'firmware') diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 718d5c4c62..015d6a9e2a 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -77,6 +77,7 @@ static enum #endif extern char* playlist_peek(int steps); +extern bool playlist_check(int steps); extern int playlist_next(int steps); extern int playlist_amount(void); extern void update_file_pos( int id, int pos ); @@ -1415,7 +1416,7 @@ static void mpeg_thread(void) } } else { - if (!playlist_peek(1)) + if (!playlist_check(1)) break; /* stop the current stream */ @@ -1450,8 +1451,10 @@ static void mpeg_thread(void) case MPEG_PREV: { DEBUGF("MPEG_PREV\n"); - if (!playlist_peek(-1)) + + if (!playlist_check(-1)) break; + /* stop the current stream */ play_pending = false; playing = false; -- cgit v1.2.3