[][src]Function sdl2_sys::SDL_SetRelativeMouseMode

pub unsafe extern "C" fn SDL_SetRelativeMouseMode(enabled: SDL_bool) -> c_int

\brief Set relative mouse mode.

\param enabled Whether or not to enable relative mode

\return 0 on success, or -1 if relative mode is not supported.

While the mouse is in relative mode, the cursor is hidden, and the driver will try to report continuous motion in the current window. Only relative motion events will be delivered, the mouse position will not change.

\note This function will flush any pending mouse motion.

\sa SDL_GetRelativeMouseMode()