aboutsummaryrefslogtreecommitdiff
path: root/engines/gargoyle/events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gargoyle/events.cpp')
-rw-r--r--engines/gargoyle/events.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/gargoyle/events.cpp b/engines/gargoyle/events.cpp
index 93b9141f78..d5eccfeba1 100644
--- a/engines/gargoyle/events.cpp
+++ b/engines/gargoyle/events.cpp
@@ -226,4 +226,20 @@ void Events::handleButtonUp(bool isLeft, const Point &pos) {
}
}
+void Events::waitForPress() {
+ Common::Event e;
+
+ do {
+ g_system->getEventManager()->pollEvent(e);
+ g_system->delayMillis(10);
+
+ if (checkForNextFrameCounter()) {
+ // Update the screen
+ g_vm->_screen->update();
+ }
+ } while (!g_vm->shouldQuit() && e.type != Common::EVENT_KEYDOWN &&
+ e.type != Common::EVENT_LBUTTONDOWN && e.type != Common::EVENT_RBUTTONDOWN &&
+ e.type != Common::EVENT_MBUTTONDOWN);
+}
+
} // End of namespace Gargoyle