diff options
Diffstat (limited to 'engines/sherlock/events.cpp')
-rw-r--r-- | engines/sherlock/events.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp index a8912f6f1e..0f3b781520 100644 --- a/engines/sherlock/events.cpp +++ b/engines/sherlock/events.cpp @@ -157,10 +157,6 @@ bool Events::isCursorVisible() const { return CursorMan.isVisible(); } -void Events::moveMouse(const Common::Point &pt) { - g_system->warpMouse(pt.x, pt.y); -} - void Events::pollEvents() { checkForNextFrameCounter(); @@ -208,7 +204,14 @@ void Events::pollEventsAndWait() { } void Events::warpMouse(const Common::Point &pt) { - g_system->warpMouse(pt.x, pt.y); + Common::Point p = pt - _vm->_screen->_currentScroll; + g_system->warpMouse(p.x, p.y); +} + +void Events::warpMouse() { + Screen &screen = *_vm->_screen; + warpMouse(Common::Point(screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH / 2, + screen._currentScroll.y + SHERLOCK_SCREEN_HEIGHT / 2)); } bool Events::checkForNextFrameCounter() { |