Don't warp the mouse for relative mode when the window doesn't have focus
This commit is contained in:
1 parent
629e9f820a
commit
b28ed02803
2 files changed
+5
-2
No files matched your search
@@ -358,7 +358,9 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
||||
mouse->last_y = center_y;
|
||||
return 0;
|
||||
}
|
||||
SDL_WarpMouseInWindow(window, center_x, center_y);
|
||||
if (window && (window->flags & SDL_WINDOW_INPUT_FOCUS) != 0) {
|
||||
SDL_WarpMouseInWindow(window, center_x, center_y);
|
||||
}
|
||||
}
|
||||
|
||||
if (relative) {
|
||||
|
||||
Reference in new issue
Block a user