diff options
-rw-r--r-- | engines/sci/event.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 44ac7ef4cf..e365296914 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -173,20 +173,18 @@ SciEvent EventManager::getScummVMEvent() { if (getSciVersion() >= SCI_VERSION_2) { const Buffer &screen = g_sci->_gfxFrameout->getCurrentBuffer(); + // This will clamp `mousePos` according to the restricted zone, + // so any cursor or screen item associated with the mouse position + // does not bounce when it hits the edge (or ignore the edge) + g_sci->_gfxCursor32->deviceMoved(mousePos); + Common::Point mousePosSci = mousePos; mulru(mousePosSci, Ratio(screen.scriptWidth, screen.screenWidth), Ratio(screen.scriptHeight, screen.screenHeight)); noEvent.mousePosSci = input.mousePosSci = mousePosSci; - if (ev.type == Common::EVENT_MOUSEMOVE) { - // This will clamp `mousePos` according to the restricted zone, - // so any cursor or screen item associated with the mouse position - // does not bounce when it hits the edge (or ignore the edge) - g_sci->_gfxCursor32->deviceMoved(mousePos); - if (_hotRectanglesActive) { - checkHotRectangles(mousePosSci); - } + if (_hotRectanglesActive) { + checkHotRectangles(mousePosSci); } - } else { #endif g_sci->_gfxScreen->adjustBackUpscaledCoordinates(mousePos.y, mousePos.x); |