Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION
This hint controls whether mouse warping generates motion events in relative mode, and defaults off. Fixes https://github.com/libsdl-org/SDL/issues/6034 Fixes https://github.com/libsdl-org/SDL/issues/5741
This commit is contained in:
parent
c2db429f93
commit
3861c557da
5 changed files with 50 additions and 16 deletions
|
@ -1064,6 +1064,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether a motion event should be generated for mouse warping in relative mode.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Warping the mouse will not generate a motion event in relative mode
|
||||
* "1" - Warping the mouse will generate a motion event in relative mode
|
||||
*
|
||||
* By default warping the mouse will not generate motion events in relative mode. This avoids the application having to filter out large relative motion due to warping.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether mouse events should generate synthetic touch events
|
||||
*
|
||||
|
|
|
@ -154,7 +154,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
|
|||
/**
|
||||
* Move the mouse cursor to the given position within the window.
|
||||
*
|
||||
* This function generates a mouse motion event.
|
||||
* This function generates a mouse motion event if relative mode is not enabled. If relative mode is enabled, you can force mouse events for the warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint.
|
||||
*
|
||||
* Note that this function will appear to succeed, but not actually move the
|
||||
* mouse when used over Microsoft Remote Desktop.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue