From a70d602f7d445cc7ffa06ba8035957e495f8c8bf Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Fri, 5 Feb 2010 23:33:31 +0000 Subject: Aceppt FS#10945 by Tomasz Kowalczyk - Fix playlists not returning to the origional order after shuffle/unshuffle git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24525 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps') diff --git a/apps/playlist.c b/apps/playlist.c index fd34cbe0cf..d90de38f37 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -984,6 +984,7 @@ static int randomise_playlist(struct playlist_info* playlist, /* * Sort the array of indices for the playlist. If start_current is true then * set the index to the new index of the current song. + * Also while going to unshuffled mode set the first_index to 0. */ static int sort_playlist(struct playlist_info* playlist, bool start_current, bool write) @@ -1012,6 +1013,7 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current, playlist->shuffle_modified = false; if (write && playlist->control_fd >= 0) { + playlist->first_index = 0; update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, playlist->first_index, -1, NULL, NULL, NULL); } -- cgit v1.2.3