aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-04-09 08:31:02 +0200
committerStrangerke2013-04-09 08:31:47 +0200
commit4d3748fb24950d3d62b84bd7655742608e606894 (patch)
treef3c02399b5a8711a439f69a1a2da794f644be3ed /engines
parent11183ee982bdb8597c19b0809f5a2de1701d0abb (diff)
downloadscummvm-rg350-4d3748fb24950d3d62b84bd7655742608e606894.tar.gz
scummvm-rg350-4d3748fb24950d3d62b84bd7655742608e606894.tar.bz2
scummvm-rg350-4d3748fb24950d3d62b84bd7655742608e606894.zip
HOPKINS: Make Hopkins sleep a bit in order to reduce CPU usage
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/events.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index dffe480833..c37e3677ea 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -212,6 +212,10 @@ void EventsManager::refreshEvents() {
}
void EventsManager::checkForNextFrameCounter() {
+ int32 delay = 10 - (g_system->getMillis() - _priorCounterTime);
+ if (delay > 0)
+ _vm->_system->delayMillis(delay);
+
// Check for whether to increment the game counter
uint32 milli = g_system->getMillis();
while ((milli - _priorCounterTime) >= 10) {