SDL: Move mouse in SDL2 only when window has focus.
This commit is contained in:
parent
1dc0411ff9
commit
23e2a61d4e
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ bool SdlWindow::hasMouseFocus() const {
|
||||||
|
|
||||||
void SdlWindow::warpMouseInWindow(uint x, uint y) {
|
void SdlWindow::warpMouseInWindow(uint x, uint y) {
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||||
if (_window) {
|
if (_window && hasMouseFocus()) {
|
||||||
SDL_WarpMouseInWindow(_window, x, y);
|
SDL_WarpMouseInWindow(_window, x, y);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue