mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 15:22:20 +00:00
Restrict mouse to window when in focus
This commit is contained in:
parent
d056e82b3b
commit
869c4241eb
1 changed files with 1 additions and 0 deletions
|
@ -752,6 +752,7 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
|
|||
if (SDL_GetMouseFocus() == window && SDL_GetKeyboardFocus() == window)
|
||||
{
|
||||
D_PostEvent(&event);
|
||||
SDL_SetWindowGrab(window, SDL_TRUE);
|
||||
HalfWarpMouse(wwidth, wheight);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue