Added SDL_HINT_JOYSTICK_IOKIT and SDL_HINT_JOYSTICK_MFI to control whether the IOKit and GCController drivers should be used for joystick support.

This can be used to work around issues where the Apple GCController driver doesn't work for some controllers but there's no way to know which GCController maps to which IOKit device.

(cherry picked from commit 708f18d49e)
(cherry picked from commit 76cc24e34a)
This commit is contained in:
Sam Lantinga
2023-11-14 10:28:19 -08:00
parent 1a722ef500
commit c2ebe1024b
3 changed files with 34 additions and 6 deletions

View File

@@ -965,6 +965,24 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
/**
* A variable controlling whether IOKit should be used for controller handling.
*
* This variable can be set to the following values:
* "0" - IOKit is not used
* "1" - IOKit is used (the default)
*/
#define SDL_HINT_JOYSTICK_IOKIT "SDL_JOYSTICK_IOKIT"
/**
* A variable controlling whether GCController should be used for controller handling.
*
* This variable can be set to the following values:
* "0" - GCController is not used
* "1" - GCController is used (the default)
*/
#define SDL_HINT_JOYSTICK_MFI "SDL_JOYSTICK_MFI"
/**
* \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
*