From b0b4ddcc5232485100fd42dcd14d164a8d2eaeac Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 29 Aug 2010 00:58:27 +0000 Subject: SCI: Fixed bug #3037874 - "SCI1.1: High cpu usage when a textbox is displayed" svn-id: r52432 --- engines/sci/engine/kevent.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines') diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index 3395811700..29447d99a1 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -23,6 +23,8 @@ * */ +#include "common/system.h" + #include "sci/sci.h" #include "sci/engine/features.h" #include "sci/engine/state.h" @@ -162,6 +164,11 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { g_sci->_soundCmd->updateSci0Cues(); } + // Wait a bit here, so that the CPU isn't maxed out when the game + // is waiting for user input (e.g. when showing text boxes) - bug + // #3037874. + g_system->delayMillis(10); + return s->r_acc; } -- cgit v1.2.3