GUI: Use PauseToken in Debugger

This commit is contained in:
Henrik "Henke37" Andersson 2020-03-15 14:23:37 +01:00 committed by Eugene Sandulenko
parent c15f268e9b
commit c5bdd7a1f2
2 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -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