mirror of
https://github.com/scummvm/scummvm.git
synced 2026-11-18 21:34:48 +00:00
SCI: Proper pausing/resuming of MIDI music in SciEngine::pauseEngineIntern(), Console::preEnter() and Console::postEnter() and added a sanity check in SciEngine::getDebugger()
svn-id: r53886
This commit is contained in:
1 parent
5a336830a0
commit
e85f43877a
2 files changed
+11
-5
No files matched your search
@@ -219,14 +219,16 @@ Console::~Console() {
|
||||
}
|
||||
|
||||
void Console::preEnter() {
|
||||
if (g_sci && g_sci->_soundCmd)
|
||||
g_sci->_soundCmd->pauseAll(true);
|
||||
if (_engine && _engine->_soundCmd)
|
||||
_engine->_soundCmd->pauseAll(true);
|
||||
g_system->getMixer()->pauseAll(true);
|
||||
_enterTime = g_system->getMillis();
|
||||
}
|
||||
|
||||
void Console::postEnter() {
|
||||
if (g_sci && g_sci->_soundCmd)
|
||||
if (_engine && _engine->_soundCmd)
|
||||
g_sci->_soundCmd->pauseAll(false);
|
||||
g_system->getMixer()->pauseAll(false);
|
||||
|
||||
if (!_videoFile.empty()) {
|
||||
_engine->_gfxCursor->kernelHide();
|
||||
|
||||
+6
-2
@@ -633,8 +633,10 @@ void SciEngine::exitGame() {
|
||||
GUI::Debugger *SciEngine::getDebugger() {
|
||||
if (_gamestate) {
|
||||
ExecStack *xs = &(_gamestate->_executionStack.back());
|
||||
xs->addr.pc.offset = _debugState.old_pc_offset;
|
||||
xs->sp = _debugState.old_sp;
|
||||
if (xs) {
|
||||
xs->addr.pc.offset = _debugState.old_pc_offset;
|
||||
xs->sp = _debugState.old_sp;
|
||||
}
|
||||
}
|
||||
|
||||
_debugState.runningStep = 0; // Stop multiple execution
|
||||
@@ -706,6 +708,8 @@ int SciEngine::inQfGImportRoom() const {
|
||||
|
||||
void SciEngine::pauseEngineIntern(bool pause) {
|
||||
_mixer->pauseAll(pause);
|
||||
if (_soundCmd)
|
||||
_soundCmd->pauseAll(pause);
|
||||
}
|
||||
|
||||
void SciEngine::syncSoundSettings() {
|
||||
|
||||
Reference in new issue
Block a user