From fc2bb6cd2086045d8261b0bf95703510a3aa1bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Mon, 17 Jun 2002 10:36:42 +0000 Subject: Made playlist shuffle an option instead of an action git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1031 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/playlist.c') diff --git a/apps/playlist.c b/apps/playlist.c index 942a578..f1bcfaa 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -31,6 +31,7 @@ #include "kernel.h" playlist_info_t playlist; +bool playlist_shuffle = false; char now_playing[256]; @@ -101,9 +102,13 @@ void play_list(char *dir, char *file) /* add track indices to playlist data structure */ add_indices_to_playlist(&playlist); - /* if shuffle is wanted, this is where to do that */ + if(playlist_shuffle) { + lcd_puts(0,0,"Shuffling..."); + lcd_update(); + randomise_playlist( &playlist, current_tick ); + } - lcd_puts(0,0,"Complete. "); + lcd_puts(0,0,"Playing... "); lcd_update(); /* also make the first song get playing */ mpeg_play(playlist_next(0)); -- cgit v1.1