aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/lever_control.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index 91e54075b6..744fde1e1c 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -203,12 +203,14 @@ void LeverControl::onMouseUp(const Common::Point &screenSpacePos, const Common::
return;
}
- _mouseIsCaptured = false;
- _engine->getScriptManager()->setStateValue(_key, _currentFrame);
+ if (_mouseIsCaptured) {
+ _mouseIsCaptured = false;
+ _engine->getScriptManager()->setStateValue(_key, _currentFrame);
- _isReturning = true;
- _returnRoutesCurrentProgress = _frameInfo[_currentFrame].returnRoute.begin();
- _returnRoutesCurrentFrame = _currentFrame;
+ _isReturning = true;
+ _returnRoutesCurrentProgress = _frameInfo[_currentFrame].returnRoute.begin();
+ _returnRoutesCurrentFrame = _currentFrame;
+ }
}
bool LeverControl::onMouseMove(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {