diff options
author | Johannes Schickel | 2010-11-01 22:19:16 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-11-01 22:19:16 +0000 |
commit | 8252fc30ce600960dc855dcecfa29092c5d6ef57 (patch) | |
tree | c9fa9fa7ea651689705c9b9543000ba749157cf4 | |
parent | a7248a0601a5b8e34fa9cccc3543e93fa9ab6649 (diff) | |
download | scummvm-rg350-8252fc30ce600960dc855dcecfa29092c5d6ef57.tar.gz scummvm-rg350-8252fc30ce600960dc855dcecfa29092c5d6ef57.tar.bz2 scummvm-rg350-8252fc30ce600960dc855dcecfa29092c5d6ef57.zip |
KYRA: Pause engine when the debugger is open.
svn-id: r54032
-rw-r--r-- | engines/kyra/debugger.cpp | 18 | ||||
-rw-r--r-- | engines/kyra/debugger.h | 6 |
2 files changed, 13 insertions, 11 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index 8e264885a1..d58494303c 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -53,6 +53,16 @@ Debugger::Debugger(KyraEngine_v1 *vm) DCmd_Register("settimercountdown", WRAP_METHOD(Debugger, cmd_setTimerCountdown)); } +void Debugger::preEnter() { + _vm->pauseEngine(true); + ::GUI::Debugger::preEnter(); +} + +void Debugger::postEnter() { + ::GUI::Debugger::postEnter(); + _vm->pauseEngine(false); +} + bool Debugger::cmd_setScreenDebug(int argc, const char **argv) { if (argc > 1) { if (scumm_stricmp(argv[1], "enable") == 0) @@ -201,14 +211,6 @@ Debugger_LoK::Debugger_LoK(KyraEngine_LoK *vm) DCmd_Register("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones)); } -void Debugger_LoK::preEnter() { - //_vm->midi.pause(1); -} - -void Debugger_LoK::postEnter() { - //_vm->midi.pause(0); -} - bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) { uint direction = 0; if (argc > 1) { diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h index c9cf6dba2a..dfc2a26aa2 100644 --- a/engines/kyra/debugger.h +++ b/engines/kyra/debugger.h @@ -41,6 +41,9 @@ public: virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ protected: + virtual void preEnter(); + virtual void postEnter(); + KyraEngine_v1 *_vm; bool cmd_setScreenDebug(int argc, const char **argv); @@ -62,9 +65,6 @@ public: protected: KyraEngine_LoK *_vm; - virtual void preEnter(); - virtual void postEnter(); - bool cmd_enterRoom(int argc, const char **argv); bool cmd_listScenes(int argc, const char **argv); bool cmd_giveItem(int argc, const char **argv); |