Restrict mouse to window when in focus
This commit is contained in:
1 parent
d056e82b3b
commit
869c4241eb
1 file changed
+1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user