Add DualShock 3 HIDAPI support on Windows (#9144)
This adds HIDAPI support for DualShock 3 controllers on Windows, addressing the current absence of this feature in SDL. To utilize this functionality, the official Sony driver 'sixaxis.sys' must be installed. HID offers several advantages over DirectInput, including rumble support and the ability to control the LED lights that display the controller number.
This commit is contained in:
committed by
GitHub
parent
feadbffb67
commit
6534029691
@@ -934,13 +934,26 @@ extern "C" {
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on other platforms.
|
||||
*
|
||||
* It is not possible to use this driver on Windows, due to limitations in the default drivers
|
||||
* installed. See https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
|
||||
* For official Sony driver (sixaxis.sys) use SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER.
|
||||
* See https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
|
||||
*
|
||||
* This hint should be set before enumerating controllers.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the Sony driver (sixaxis.sys) for PS3 controllers (Sixaxis/DualShock 3) should be used.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Sony driver (sixaxis.sys) is not used.
|
||||
* "1" - Sony driver (sixaxis.sys) is used.
|
||||
*
|
||||
* The default value is 0.
|
||||
*
|
||||
* This hint should be set before enumerating controllers.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"
|
||||
|
||||
/**
|
||||
* A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user