aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-21 22:49:54 +0100
committerEugene Sandulenko2016-02-21 22:53:26 +0100
commit59aede6228695af605f447c20f2caaf137559043 (patch)
treedcda1408c180f21883c7d3c6f0cb000b719d3000 /engines
parent93af01a58acf6dcb3bb7e6efcb62662192258e4e (diff)
downloadscummvm-rg350-59aede6228695af605f447c20f2caaf137559043.tar.gz
scummvm-rg350-59aede6228695af605f447c20f2caaf137559043.tar.bz2
scummvm-rg350-59aede6228695af605f447c20f2caaf137559043.zip
SWORD25: Fix bug #6981: High CPU usage on one core
The game loop is implemented in Lua, and there are no delays. Now we wait 10ms on each event pulling, as we always do.
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/kernel/kernel_script.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/sword25/kernel/kernel_script.cpp b/engines/sword25/kernel/kernel_script.cpp
index 1b7c6a6f14..40dcbd5b98 100644
--- a/engines/sword25/kernel/kernel_script.cpp
+++ b/engines/sword25/kernel/kernel_script.cpp
@@ -257,6 +257,7 @@ static int processMessages(lua_State *L) {
// to the closeWanted() opcode; see also the TODO comment in there.
lua_pushbooleancpp(L, !Engine::shouldQuit());
+ g_system->delayMillis(10);
return 1;
}