diff options
author | D G Turner | 2012-04-21 01:31:42 +0100 |
---|---|---|
committer | D G Turner | 2012-04-21 01:55:05 +0100 |
commit | a5745434d30f0039db0f5ca7b5ff6781b777d819 (patch) | |
tree | 0c3f37269e85dcf901bdf3c2dca7eda9645be3f7 | |
parent | f351a1d7ba28db0924e602e9ee9677edf4ac72f0 (diff) | |
download | scummvm-rg350-a5745434d30f0039db0f5ca7b5ff6781b777d819.tar.gz scummvm-rg350-a5745434d30f0039db0f5ca7b5ff6781b777d819.tar.bz2 scummvm-rg350-a5745434d30f0039db0f5ca7b5ff6781b777d819.zip |
CRUISE: Fix update of background animations while waiting for user.
This is the third and final part of the patch supplied by Ignaz Forster
on bug #3423955 ("CRUISE: Slow / unresponsive game behaviour") for
avoiding blocking graphical updates during user wait loops.
The removal of the continue statement fixes the update of background
animations while waiting for user to respond i.e. try opening a locked
door on the upper deck of the boat and check the sea background
animation, but it also has the side effect of allowing hotspots to
respond during this period if the user clicks fast enough.
However, this bug was also present in the original interpreter, and
a workaround has been added to inhibit this.
-rw-r--r-- | engines/cruise/cruise_main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index fe113deebf..911041c1a4 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -1872,6 +1872,14 @@ void CruiseEngine::mainLoop() { // readKeyboard(); bool isUserWait = userWait != 0; + // WORKAROUND: This prevents hotspots responding during + // delays i.e. Menu opening if you click fast on another + // hotspot after trying to open a locked door, which + // occurred with the original interpreter. + if (userDelay) { + currentMouseButton = 0; + } + playerDontAskQuit = processInput(); if (playerDontAskQuit) break; @@ -1883,7 +1891,6 @@ void CruiseEngine::mainLoop() { if (userDelay && !userWait) { userDelay--; - continue; } if (isUserWait & !userWait) { |