From a5745434d30f0039db0f5ca7b5ff6781b777d819 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 21 Apr 2012 01:31:42 +0100 Subject: 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. --- engines/cruise/cruise_main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/cruise') 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) { -- cgit v1.2.3