aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/inter_v2.cpp')
-rw-r--r--engines/gob/inter_v2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index cf74252e09..2d39fc0a65 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -24,6 +24,8 @@
*/
#include "common/endian.h"
+#include "common/events.h"
+
#include "sound/mixer.h"
#include "sound/mods/infogrames.h"
@@ -1483,7 +1485,7 @@ void Inter_v2::o2_scroll() {
curX = startX;
curY = startY;
- while (!_vm->_quit && ((curX != endX) || (curY != endY))) {
+ while (!g_system->getEventManager()->shouldQuit() && ((curX != endX) || (curY != endY))) {
curX = stepX > 0 ? MIN(curX + stepX, (int) endX) :
MAX(curX + stepX, (int) endX);
curY = stepY > 0 ? MIN(curY + stepY, (int) endY) :