mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
CGE: Fix issue with music not stopping when reloading game
If you turn off the music and then save a game, then turn on the music again and then load the saved game, the music from the scene continue to play despite the _music flag being false. So the first time you click on the music on/off button the music restart and only the second time does it stop. This fixes the bug by stoping the music before reloading a game.
This commit is contained in:
parent
7c81f75d27
commit
b419f73973
@ -279,6 +279,10 @@ Common::Error CGEEngine::loadGameState(int slot) {
|
||||
sceneDown();
|
||||
_hero->park();
|
||||
resetGame();
|
||||
|
||||
// If music is playing, kill it.
|
||||
if (_music)
|
||||
_midiPlayer->killMidi();
|
||||
|
||||
// Load the game
|
||||
loadGame(slot, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user