mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Don't warp the mouse for relative mode when the window doesn't have focus
This commit is contained in:
@@ -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