Hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS added so we can recognise a Joy-Con as half a Pro Controller, so we can read its analog input and read its sensors just like we do a Pro Controller.

This commit is contained in:
JibbSmart 2021-01-18 19:57:29 +08:00 committed by JibbSmart
parent bd553ea868
commit 0f57864c9e
6 changed files with 70 additions and 6 deletions

View file

@ -685,6 +685,17 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
/**
* \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
*
* This variable can be set to the following values:
* "0" - basic Joy-Con support with no analog input (the default)
* "1" - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
*
* This does not combine Joy-Cons into a single controller. That's up to the user.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
/**
* \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
*