Sony DualShock 4 and Google Stadia controllers support via Windows.Gaming.Input API

Dimitriy Ryazantcev 26 Reputation points
2020-05-22T16:12:32.5+00:00

I trying to use Sony DualShock 4 and Google Stadia controllers via Windows.Gaming.Input API with vibration feedback.

They are both HID gamepads that get detected as RawGameController. Its ok, but RawGameController.SimpleHapticsControllers and RawGameController.ForceFeedbackMotors fields are just empty in these cases. Seems they are not announcing vibration support via HID descriptor. This is a fairly common case.

According to MSDN seems there is possible to implement a custom Windows.Gaming.Input.IGameController:

This interface exists mainly to support extensibility for game controllers, which allows OEMs (Original Equipment Manufacturers) to publish WinRT (Windows Runtime) classes that provide rich access to their device's features, while integrating into the underlying game controller device enumeration framework.

As I understand it can be done via GameControllerFactoryManager.RegisterCustomFactoryForHardwareId() call and providing a custom ICustomGameControllerFactory in it along with needed usb VendorId and ProductId. And then somehow sending special HID Output Reports (DualShock4, Stadia) for these controllers via HidGameControllerProvider.SendOutputReport() method.

Can I do such trick in my application via C++/WinRT for full support of such gamepads? Could you provide any example of such classes?
Appreciate any help.

8584-100764705-139349141004874-7039329205471136628-n1.jpg

Universal Windows Platform (UWP)
{count} vote

Accepted answer
  1. Fay Wang - MSFT 5,191 Reputation points
    2020-06-08T09:26:38.8+00:00

    Hello,

    Welcome to Microsoft Q&A!

    It is a known issue that RawGameController.SimpleHapticsControllers and RawGameController.ForceFeedbackMotors fields are empty when using Sony DualShock 4 and Google Stadia controllers. In addition, there is no way for end developer to send HID output report to HID gamepad at this time and end vendor would need to supply driver to allow this to function and work from UWP raw gaming controller interface.

    Thanks.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful