hidapi: Add a stub driver for Switch 2.

Thanks to kiddkaffeine for the Xcode updates!
This commit is contained in:
Ethan Lee
2025-06-26 13:13:02 -04:00
committed by Sam Lantinga
parent 5972b5295d
commit efea62ed61
10 changed files with 181 additions and 0 deletions

View File

@@ -1823,6 +1823,23 @@ extern "C" {
*/
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
/**
* A variable controlling whether the HIDAPI driver for Nintendo Switch 2
* controllers should be used.
*
* The variable can be set to the following values:
*
* - "0": HIDAPI driver is not used.
* - "1": HIDAPI driver is used.
*
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI.
*
* This hint should be set before initializing joysticks and gamepads.
*
* \since This hint is available since SDL 3.4.0.
*/
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 "SDL_JOYSTICK_HIDAPI_SWITCH2"
/**
* A variable controlling whether Nintendo Switch Joy-Con controllers will be
* in vertical mode when using the HIDAPI driver.