ENGINES: Adding debugger to base Engine class

This commit is contained in:
Paul Gilbert 2020-02-08 20:33:53 -08:00 committed by Filippos Karapetis
parent a369a13bab
commit 7b721eaac1
5 changed files with 39 additions and 2 deletions

View file

@ -33,6 +33,8 @@
#include "common/translation.h"
#include "common/algorithm.h"
#include "common/file.h"
#include "gui/debugger.h"
#include "engines/engine.h"
#ifdef USE_OSD
#include "common/tokenizer.h"
#include "common/rect.h"
@ -472,6 +474,11 @@ void OpenGLGraphicsManager::updateScreen() {
}
#endif
// If there's an active debugger, update it
GUI::Debugger *debugger = g_engine ? g_engine->getDebugger() : nullptr;
if (debugger)
debugger->onFrame();
// We only update the screen when there actually have been any changes.
if ( !_forceRedraw
&& !_cursorNeedsRedraw