diff options
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 7 | ||||
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.h | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index e6699df1cd..64ee9f7aa1 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -212,6 +212,13 @@ bool SdlGraphicsManager::notifyMousePosition(Common::Point &mouse) { return valid; } +void SdlGraphicsManager::setSystemMousePosition(const int x, const int y) { + assert(_window); + if (!_window->warpMouseInWindow(x, y)) { + _eventSource->fakeWarpMouse(x, y); + } +} + void SdlGraphicsManager::handleResizeImpl(const int width, const int height) { _eventSource->resetKeyboardEmulation(width - 1, height - 1); _forceRedraw = true; diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h index 993a1c3db6..526306270b 100644 --- a/backends/graphics/sdl/sdl-graphics.h +++ b/backends/graphics/sdl/sdl-graphics.h @@ -150,10 +150,7 @@ protected: #endif } - virtual void setSystemMousePosition(const int x, const int y) override { - assert(_window); - _window->warpMouseInWindow(x, y); - } + virtual void setSystemMousePosition(const int x, const int y) override; virtual void handleResizeImpl(const int width, const int height) override; |