Changeset - r28193:c6d7c1f56845
[Not reviewed]
master
0 1 0
Peter Nelson - 12 months ago 2023-11-28 17:44:31
peter1138@openttd.org
Fix ab1a4c6c: Changing baseset/playlist while shuffle is on does not change song. (#11510)

The change-playlist function relied on toggling shuffle to restart playing which is no longer the case, so always handle it when changing playlist instead.
1 file changed with 2 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/music_gui.cpp
Show inline comments
 
@@ -156,12 +156,8 @@ void MusicSystem::ChangePlaylist(Playlis
 
		this->selected_playlist = pl;
 
		this->playlist_position = 0;
 

	
 
		if (_settings_client.music.shuffle) {
 
			this->Shuffle();
 
			/* Shuffle() will also Play() if necessary, only start once */
 
		} else if (_settings_client.music.playing) {
 
			this->Play();
 
		}
 
		if (_settings_client.music.shuffle) this->Shuffle();
 
		if (_settings_client.music.playing) this->Play();
 
	}
 

	
 
	InvalidateWindowData(WC_MUSIC_TRACK_SELECTION, 0);
0 comments (0 inline, 0 general)