Added a hint to capture the mouse when mouse buttons are pressed, defaulting on

Fixes https://github.com/libsdl-org/SDL/issues/5301
This commit is contained in:
Sam Lantinga
2022-03-17 17:39:46 -07:00
parent 09b8152fae
commit 5ff42438e3
3 changed files with 58 additions and 14 deletions

View File

@@ -969,6 +969,19 @@ extern "C" {
*/
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
/**
* \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
*
* This variable can be set to the following values:
* "0" - The mouse is not captured while mouse buttons are pressed
* "1" - The mouse is captured while mouse buttons are pressed
*
* By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
* outside the window, the application continues to receive mouse events until the button is
* released.
*/
#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
/**
* \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
*