[Scummvm-cvs-logs] SF.net SVN: scummvm:[53886] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Oct 27 21:22:37 CEST 2010
Revision: 53886
http://scummvm.svn.sourceforge.net/scummvm/?rev=53886&view=rev
Author: thebluegr
Date: 2010-10-27 19:22:37 +0000 (Wed, 27 Oct 2010)
Log Message:
-----------
SCI: Proper pausing/resuming of MIDI music in SciEngine::pauseEngineIntern(), Console::preEnter() and Console::postEnter() and added a sanity check in SciEngine::getDebugger()
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
scummvm/trunk/engines/sci/sci.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2010-10-27 19:22:05 UTC (rev 53885)
+++ scummvm/trunk/engines/sci/console.cpp 2010-10-27 19:22:37 UTC (rev 53886)
@@ -219,14 +219,16 @@
}
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();
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-10-27 19:22:05 UTC (rev 53885)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-10-27 19:22:37 UTC (rev 53886)
@@ -633,8 +633,10 @@
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 @@
void SciEngine::pauseEngineIntern(bool pause) {
_mixer->pauseAll(pause);
+ if (_soundCmd)
+ _soundCmd->pauseAll(pause);
}
void SciEngine::syncSoundSettings() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list