Joystick: Add new GIP driver to replace old Xbox One wired driver
This new driver is based on official documentation released by Microsoft in September, though it still lacks several important features, notably the Security handshake for wireless dongles and audio support. It is, however, more reliable and extensible than the old driver.
This commit is contained in:
parent
48dfc03a87
commit
00f3a82ada
12 changed files with 2471 additions and 0 deletions
|
@ -1949,6 +1949,41 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the new HIDAPI driver for wired Xbox One
|
||||
* (GIP) 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_XBOX_ONE.
|
||||
*
|
||||
* 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_GIP "SDL_JOYSTICK_HIDAPI_GIP"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the new HIDAPI driver for wired Xbox One
|
||||
* (GIP) controllers should reset the controller if it can't get the
|
||||
* metadata from the controller.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Assume this is a generic controller.
|
||||
* - "1": Reset the controller to get metadata.
|
||||
*
|
||||
* By default the controller is not reset.
|
||||
*
|
||||
* 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_GIP_RESET_FOR_METADATA "SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA"
|
||||
|
||||
/**
|
||||
* A variable controlling whether IOKit should be used for controller
|
||||
* handling.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue