From 4d3748fb24950d3d62b84bd7655742608e606894 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 9 Apr 2013 08:31:02 +0200 Subject: HOPKINS: Make Hopkins sleep a bit in order to reduce CPU usage --- engines/hopkins/events.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines') 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) { -- cgit v1.2.3