mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +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…
Add table
Reference in a new issue