aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/events.cpp')
-rw-r--r--engines/sherlock/events.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index fdcf61e46f..4a51c4a5fb 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -116,6 +116,15 @@ void EventsManager::pollEvents() {
}
/**
+ * Poll for events and introduce a small delay, to allow the system to
+ * yield to other running programs
+ */
+void EventsManager::pollEventsAndWait() {
+ pollEvents();
+ g_system->delayMillis(10);
+}
+
+/**
* Check whether it's time to display the next screen frame
*/
bool EventsManager::checkForNextFrameCounter() {
@@ -149,7 +158,7 @@ void EventsManager::clearEvents() {
}
/**
- * Delay for a given number of frames/cycles
+ * Delay for a given number of cycles, where each cycle is 1/60th of a second
*/
void EventsManager::delay(int cycles) {
uint32 totalMilli = cycles * 1000 / GAME_FRAME_RATE;