diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-02-05 23:33:31 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-02-05 23:33:31 +0000 |
commit | a70d602f7d445cc7ffa06ba8035957e495f8c8bf (patch) | |
tree | 6fec67a65f2a33d5f82f4f315665a63641a483c7 /apps/playlist.c | |
parent | c8ea43f0957ff75664a03332c602dee241717435 (diff) | |
download | rockbox-a70d602f7d445cc7ffa06ba8035957e495f8c8bf.tar.gz rockbox-a70d602f7d445cc7ffa06ba8035957e495f8c8bf.zip |
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
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
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, | |||
984 | /* | 984 | /* |
985 | * Sort the array of indices for the playlist. If start_current is true then | 985 | * Sort the array of indices for the playlist. If start_current is true then |
986 | * set the index to the new index of the current song. | 986 | * set the index to the new index of the current song. |
987 | * Also while going to unshuffled mode set the first_index to 0. | ||
987 | */ | 988 | */ |
988 | static int sort_playlist(struct playlist_info* playlist, bool start_current, | 989 | static int sort_playlist(struct playlist_info* playlist, bool start_current, |
989 | bool write) | 990 | bool write) |
@@ -1012,6 +1013,7 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current, | |||
1012 | playlist->shuffle_modified = false; | 1013 | playlist->shuffle_modified = false; |
1013 | if (write && playlist->control_fd >= 0) | 1014 | if (write && playlist->control_fd >= 0) |
1014 | { | 1015 | { |
1016 | playlist->first_index = 0; | ||
1015 | update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, | 1017 | update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, |
1016 | playlist->first_index, -1, NULL, NULL, NULL); | 1018 | playlist->first_index, -1, NULL, NULL, NULL); |
1017 | } | 1019 | } |