diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-04-11 00:29:15 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-04-11 00:29:15 +0000 |
| commit | 9d860e19d2aedc9dc672a037b7c2de728dd6477e (patch) | |
| tree | 5d193eb0bac65aead2d5d80f40f1055d0fa7cadf /apps | |
| parent | 9c1f29f9fb7438b0d669e541291f5df674ef45fe (diff) | |
| download | rockbox-9d860e19d2aedc9dc672a037b7c2de728dd6477e.zip rockbox-9d860e19d2aedc9dc672a037b7c2de728dd6477e.tar.gz rockbox-9d860e19d2aedc9dc672a037b7c2de728dd6477e.tar.bz2 rockbox-9d860e19d2aedc9dc672a037b7c2de728dd6477e.tar.xz | |
Better handling of next/prev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3528 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playlist.c | 8 | ||||
| -rw-r--r-- | apps/playlist.h | 1 | ||||
| -rw-r--r-- | apps/wps.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 165c138..ebe82cc 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -378,6 +378,14 @@ int playlist_next(int steps) return index; } +/* Returns false if 'steps' is out of bounds, else true */ +bool playlist_check(int steps) +{ + bool queue; + int index = get_next_index(steps, &queue); + return (index >= 0); +} + char* playlist_peek(int steps) { int seek; diff --git a/apps/playlist.h b/apps/playlist.h index 57a23f2..ea77886 100644 --- a/apps/playlist.h +++ b/apps/playlist.h @@ -55,6 +55,7 @@ int play_list(char *dir, char *file, int start_index, char* playlist_peek(int steps); char* playlist_name(char *name, int name_size); int playlist_next(int steps); +bool playlist_check(int steps); void randomise_playlist( unsigned int seed ); void sort_playlist(bool start_current); void add_indices_to_playlist(void); @@ -915,7 +915,6 @@ int wps_show(void) break; #endif if (!id3 || (id3->elapsed < 3*1000)) { - mpeg_stop(); mpeg_prev(); } else { @@ -935,7 +934,6 @@ int wps_show(void) if ( lastbutton != BUTTON_RIGHT ) break; #endif - mpeg_stop(); mpeg_next(); break; |