aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/gfxModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cruise/gfxModule.cpp')
-rw-r--r--engines/cruise/gfxModule.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index 2ffd0a08f2..400192636a 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -27,6 +27,7 @@
#include "common/system.h"
#include "common/endian.h"
+#include "cruise/cruise.h"
#include "cruise/cruise_main.h"
namespace Cruise {
@@ -223,7 +224,7 @@ void gfxModuleData_flipScreen(void) {
extern bool bFastMode;
-static uint32 lastTick;
+static uint32 lastTick = 0, lastTickDebug = 0;
void flip() {
int i;
@@ -246,6 +247,13 @@ void flip() {
uint32 currentTick = g_system->getMillis();
+ if (currentTick >= (lastTickDebug + 10)) {
+ lastTickDebug = currentTick;
+
+ if (_vm->getDebugger()->isAttached())
+ _vm->getDebugger()->onFrame();
+ }
+
if (!bFastMode) {
uint32 speed = 50;
if (lastTick + speed > currentTick) {