Set a window's mouse grab mode.
Defined in <SDL3/SDL_video.h>
bool SDL_SetWindowMouseGrab(SDL_Window *window, bool grabbed);
SDL_Window * | window | the window for which the mouse grab mode should be set. |
bool | grabbed | this is true to grab mouse, and false to release. |
(bool) Returns true on success or false on failure; call SDL_GetError() for more information.
Mouse grab confines the mouse cursor to the window.
This function should only be called on the main thread.
This function is available since SDL 3.1.3.
CategoryAPI, CategoryAPIFunction, CategoryVideo, CategoryMouse,