diff options
author | Colin Snover | 2017-01-09 22:57:41 -0600 |
---|---|---|
committer | Colin Snover | 2017-01-11 11:01:38 -0600 |
commit | 7156a82a64dea2b2836d42b0d5bcffe4841eb40c (patch) | |
tree | 60dffe70d5c13c5527074ec01ab6a36f1ab6be0a | |
parent | 7b90f0693ab04dd2d03c097a4a49858f3685a75f (diff) | |
download | scummvm-rg350-7156a82a64dea2b2836d42b0d5bcffe4841eb40c.tar.gz scummvm-rg350-7156a82a64dea2b2836d42b0d5bcffe4841eb40c.tar.bz2 scummvm-rg350-7156a82a64dea2b2836d42b0d5bcffe4841eb40c.zip |
SCI32: Improve mouse responsiveness
This is most noticeable at the beginning of the game during
benchmarking, where the benchmarking loop used to cause the mouse
to get stuck for the duration of the benchmark.
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 08fdd5143f..749403093f 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -35,6 +35,7 @@ #include "sci/sci.h" #include "sci/console.h" +#include "sci/event.h" #include "sci/engine/features.h" #include "sci/engine/kernel.h" #include "sci/engine/state.h" @@ -507,6 +508,14 @@ void GfxFrameout::kernelAddPicAt(const reg_t planeObject, const GuiResourceId pi #pragma mark Rendering void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseRect) { + // In SSCI, mouse events were received via hardware interrupt, so the mouse + // cursor would always get updated whenever the user moved the mouse. Since + // we must poll for mouse events instead, poll here so that the mouse gets + // updated with its current position at render time. If we do not do this, + // the mouse gets "stuck" during loops that do not make calls to kGetEvent, + // like transitions and the benchmarking loop at the start of every game. + g_sci->getEventManager()->getSciEvent(SCI_EVENT_PEEK); + RobotDecoder &robotPlayer = g_sci->_video32->getRobotPlayer(); const bool robotIsActive = robotPlayer.getStatus() != RobotDecoder::kRobotStatusUninitialized; |