diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 07c7aa5ea..371a6e54c 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2897,7 +2897,9 @@ SDL_OnWindowFocusGained(SDL_Window * window) if (mouse && mouse->relative_mode) { SDL_SetMouseFocus(window); - SDL_WarpMouseInWindow(window, window->w/2, window->h/2); + if (mouse->relative_mode_warp) { + SDL_WarpMouseInWindow(window, window->w/2, window->h/2); + } } SDL_UpdateWindowGrab(window);