mirror of
https://github.com/encounter/SDL.git
synced 2025-12-20 10:25:28 +00:00
Fixed warping back into the window when gaining focus with warp relative mode enabled
This commit is contained in:
@@ -3038,7 +3038,7 @@ SDL_OnWindowFocusGained(SDL_Window * window)
|
||||
if (mouse && mouse->relative_mode) {
|
||||
SDL_SetMouseFocus(window);
|
||||
if (mouse->relative_mode_warp) {
|
||||
SDL_WarpMouseInWindow(window, window->w/2, window->h/2);
|
||||
SDL_PerformWarpMouseInWindow(window, window->w/2, window->h/2, SDL_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user