SDL_SetWindowMouseGrab

Set a window's mouse grab mode.

Mouse grab confines the mouse cursor to the window.

extern (C) nothrow @nogc extern
bool
SDL_SetWindowMouseGrab

Parameters

window SDL_Window*

the window for which the mouse grab mode should be set.

grabbed bool

this is true to grab mouse, and false to release.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError() for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta