Permalink
Browse files

SCI: Stop sleeping if the game is trying to quit

This applies to any sleep, but is particularly noticeable in games
that send SysEx messages to MT-32, which add delays by sleeping in
order to avoid buffer overflows in the device firmware.
  • Loading branch information...
csnover authored and bluegr committed Jul 23, 2017
1 parent 098d4bc commit 00552e62c398acf787fe57fa2aa209ea933dac43
Showing with 5 additions and 0 deletions.
  1. +5 −0 engines/sci/sci.cpp
@@ -859,6 +859,11 @@ void SciEngine::sleep(uint32 msecs) {
// let backend process events and update the screen
_eventMan->getSciEvent(kSciEventPeek);
// There is no point in waiting any more if we are just waiting to quit
if (g_engine->shouldQuit()) {
return;
}
#ifdef ENABLE_SCI32
// If a game is in a wait loop, kFrameOut is not called, but mouse
// movement is still occurring and the screen needs to be updated to

0 comments on commit 00552e6

Please sign in to comment.