Reset to the start of the playlist when we've reached the end of it, don't move past the end first. This addresses bug #11879 in part (by preventing it even further from occuring).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5333 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
9bf7563e4b
commit
bc810ca2e2
|
@ -142,10 +142,13 @@ const char* PlayList_CurrentSong()
|
|||
|
||||
const char* PlayList_NextSong()
|
||||
{
|
||||
if (currentSong)
|
||||
// If there's a next song in the playlist select it
|
||||
if (currentSong
|
||||
&& currentSong->next)
|
||||
{
|
||||
currentSong = currentSong->next;
|
||||
}
|
||||
// Otherwise jump to the start of the playlist
|
||||
else
|
||||
{
|
||||
currentSong = songList;
|
||||
|
|
Loading…
Reference in New Issue