mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
Added SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS to control whether SDL_hid_enumerate() enumerates all HID devices or only controllers.
By default SDL will only enumerate controllers, to reduce risk of hanging or crashing on devices with bad drivers and avoiding macOS keyboard capture permission prompts.
This commit is contained in:
parent
77e59d4fa9
commit
0ffeca8a1c
10 changed files with 66 additions and 89 deletions
|
@ -580,6 +580,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether SDL_hid_enumerate() enumerates all HID devices or only controllers.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - SDL_hid_enumerate() will enumerate all HID devices
|
||||
* "1" - SDL_hid_enumerate() will only enumerate controllers
|
||||
*
|
||||
* By default SDL will only enumerate controllers, to reduce risk of hanging or crashing on devices with bad drivers and avoiding macOS keyboard capture permission prompts.
|
||||
*/
|
||||
#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
|
||||
|
||||
/**
|
||||
* \brief A variable containing a list of devices to ignore in SDL_hid_enumerate()
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue