InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

[Windows] DualShock added twice if DS4Windows/DS4Tools is installed and XInput support enabled

Open Rene-Damm opened this issue 8 years ago • 1 comments

If DS4Windows or DS4Tools is installed and XInput support is enabled, then a DualShock gamepad plugged into the machine will be visible both as a HID and as an XInput controller. This leads to the input system adding both a DualShockGamepadHID and an XInputControllerWindows gamepad for what underneath is the same device.

This is likely going to be hard to detect on our side. We filter out XInput HIDs added by Microsoft's driver to solve the same situation there. However, doing the same the DS4Windows/DS4Tools case is likely not going to be as straightforward.

The XInput API makes it impossible to tell which device sits behind an XInput controller index. So to handle this case, it seems we'll have to determine whether a given HID is a DualShock controller and then detect whether DS4Windows/DS4Tools is present and running with XInput enabled for the app.

Hopefully there's a simpler solution.

Rene-Damm avatar Jul 28 '18 00:07 Rene-Damm

Closing. Tracked here: https://issuetracker.unity3d.com/issues/windows-gamepad-dualshock-added-twice-if-ds4windows-slash-ds4tools-is-installed-and-xinput-support-enabled

JiaUnity avatar Apr 10 '19 00:04 JiaUnity