mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 23:49:12 +00:00
Added a relative mouse mode that uses mouse warping instead of raw input.
To enable this, set the environment variable SDL_MOUSE_RELATIVE_MODE_WARP to "1" When mouse relative mode is disabled, put the cursor back where the application expects it to be, instead of where it was when relative mode was enabled.
This commit is contained in:
parent
7fe277cd6a
commit
7aef2350cf
7 changed files with 116 additions and 67 deletions
|
@ -173,7 +173,18 @@ extern "C" {
|
|||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief Minimize your SDL_Window if it loses key focus when in Fullscreen mode. Defaults to true.
|
||||
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Relative mouse mode uses raw input
|
||||
* "1" - Relative mouse mode uses mouse warping
|
||||
*
|
||||
* By default SDL will use raw input for relative mouse mode
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
|
||||
|
||||
/**
|
||||
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue