MADE: Pause MIDI music when pausing engine

The MIDI music on external softsynths and devices would keep playing while the
engine was paused. This commit fixes this by implementing the
Engine::pauseEngineIntern method to pause the MIDI music when the engine is
paused.
This commit is contained in:
Coen Rampen 2021-09-29 23:08:06 +02:00
parent 2d5e8dbee6
commit 0a702a6e3f
2 changed files with 14 additions and 0 deletions

View File

@ -310,4 +310,16 @@ Common::Error MadeEngine::run() {
return Common::kNoError;
}
void MadeEngine::pauseEngineIntern(bool pause) {
Engine::pauseEngineIntern(pause);
if (pause) {
if (_music)
_music->pause();
} else {
if (_music)
_music->resume();
}
}
} // End of namespace Made

View File

@ -107,6 +107,8 @@ public:
void handleEvents();
protected:
void pauseEngineIntern(bool pause);
};
} // End of namespace Made