aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2018-07-13 19:34:46 +0200
committerBastien Bouclet2018-07-13 19:44:54 +0200
commit9729ff3706f9b3bf67521e62ddd89c100527731e (patch)
tree69f859488fea13c60fb1422857ccf136ae62db2d /engines/mohawk/riven.cpp
parentd91ac014195dea06e42daa7351c9a3844ef34aec (diff)
downloadscummvm-rg350-9729ff3706f9b3bf67521e62ddd89c100527731e.tar.gz
scummvm-rg350-9729ff3706f9b3bf67521e62ddd89c100527731e.tar.bz2
scummvm-rg350-9729ff3706f9b3bf67521e62ddd89c100527731e.zip
MOHAWk: RIVEN: Reset the mouse cursor when changing stack / unpausing
Diffstat (limited to 'engines/mohawk/riven.cpp')
-rw-r--r--engines/mohawk/riven.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 77d52f9aa5..1f19b080de 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -369,6 +369,12 @@ void MohawkEngine_Riven::pauseEngineIntern(bool pause) {
_video->pauseVideos();
} else {
_video->resumeVideos();
+
+ if (_stack) {
+ // The mouse may have moved while the game was paused,
+ // the mouse cursor needs to be updated.
+ _stack->onMouseMove(_eventMan->getMousePos());
+ }
}
}
@@ -444,6 +450,10 @@ void MohawkEngine_Riven::changeToStack(uint16 stackId) {
delete _stack;
_stack = constructStackById(stackId);
+
+ // Set the mouse position to the correct value so the mouse
+ // cursor can be computed accurately when loading a card.
+ _stack->onMouseMove(getEventManager()->getMousePos());
}
const char **MohawkEngine_Riven::listExpectedDatafiles() const {