diff options
author | Eugene Sandulenko | 2016-09-04 16:48:50 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-04 16:48:50 +0200 |
commit | 23e2a61d4ed058313654ac64327684d49d79af54 (patch) | |
tree | 771e3a8bcf679895bf3ae920f1f6c2753d8f953f /backends | |
parent | 1dc0411ff984d9944fbe777b003c929eb713d775 (diff) | |
download | scummvm-rg350-23e2a61d4ed058313654ac64327684d49d79af54.tar.gz scummvm-rg350-23e2a61d4ed058313654ac64327684d49d79af54.tar.bz2 scummvm-rg350-23e2a61d4ed058313654ac64327684d49d79af54.zip |
SDL: Move mouse in SDL2 only when window has focus.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/sdl/sdl-window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp index 6d35f77ae0..609186a061 100644 --- a/backends/platform/sdl/sdl-window.cpp +++ b/backends/platform/sdl/sdl-window.cpp @@ -150,7 +150,7 @@ bool SdlWindow::hasMouseFocus() const { void SdlWindow::warpMouseInWindow(uint x, uint y) { #if SDL_VERSION_ATLEAST(2, 0, 0) - if (_window) { + if (_window && hasMouseFocus()) { SDL_WarpMouseInWindow(_window, x, y); } #else |