diff options
author | Colin Snover | 2017-07-23 11:40:58 -0500 |
---|---|---|
committer | Colin Snover | 2017-07-23 11:42:55 -0500 |
commit | 580f3875c099f78790453ba703414cf1ef71f412 (patch) | |
tree | 6a509435096d3f66d090148ac5f3f5c2f981c55c /engines/sci/graphics | |
parent | dabcacb0ca2157e1b82c52cb5b2f54549c9e77f9 (diff) | |
download | scummvm-rg350-580f3875c099f78790453ba703414cf1ef71f412.tar.gz scummvm-rg350-580f3875c099f78790453ba703414cf1ef71f412.tar.bz2 scummvm-rg350-580f3875c099f78790453ba703414cf1ef71f412.zip |
SCI32: Fix explicit mouse position changes
This was broken by 9f33f2b3df22a26314dbb74173f49bc930c7a1f9.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/cursor32.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp index feb62ee011..b374e9d512 100644 --- a/engines/sci/graphics/cursor32.cpp +++ b/engines/sci/graphics/cursor32.cpp @@ -338,10 +338,12 @@ void GfxCursor32::setPosition(const Common::Point &position) { const int16 screenWidth = g_sci->_gfxFrameout->getCurrentBuffer().screenWidth; const int16 screenHeight = g_sci->_gfxFrameout->getCurrentBuffer().screenHeight; - _position.x = (position.x * Ratio(screenWidth, scriptWidth)).toInt(); - _position.y = (position.y * Ratio(screenHeight, scriptHeight)).toInt(); + Common::Point newPosition; + newPosition.x = (position.x * Ratio(screenWidth, scriptWidth)).toInt(); + newPosition.y = (position.y * Ratio(screenHeight, scriptHeight)).toInt(); - g_system->warpMouse(_position.x, _position.y); + g_system->warpMouse(newPosition.x, newPosition.y); + deviceMoved(newPosition); } void GfxCursor32::gonnaPaint(Common::Rect paintRect) { |