diff --git a/gui/debugger.cpp b/gui/debugger.cpp index ea8a699ac00..895f37336d0 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -147,11 +147,11 @@ void Debugger::debugPrintColumns(const Common::StringArray &list) { } void Debugger::preEnter() { - g_engine->pauseEngine(true); + _debugPauseToken = g_engine->pauseEngine(); } void Debugger::postEnter() { - g_engine->pauseEngine(false); + _debugPauseToken.clear(); } void Debugger::attach(const char *entry) { diff --git a/gui/debugger.h b/gui/debugger.h index a100aae170a..9ffef6bb05d 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -31,6 +31,8 @@ #include "common/str.h" #include "common/str-array.h" +#include "engine.h" + namespace GUI { #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER @@ -172,6 +174,9 @@ private: */ bool _firstTime; +protected: + PauseToken _debugPauseToken; + #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER GUI::ConsoleDialog *_debuggerDialog; #endif