question

DJm00n avatar image
DJm00n asked ·

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

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


windows-uwp
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

As the document of IGameController mentioned, it only allows OEMs to publish WinRT (Windows Runtime) classes. If you are working with an OEM, please try to contact them to see if they have any workaround for you.


0 Votes 0 · ·

Is there any way to send HID output report to HID gamepad via public RawGameController API?

0 Votes 0 · ·

1 Answer

FayWang-MSFT avatar image
FayWang-MSFT answered ·

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.

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there any plans on supplying such functions? At least any way to get underlying Windows.Devices.HumanInterfaceDevice.HidDevice from Windows.Gaming.Input.RawGameController will be enough to implement it by hand.

0 Votes 0 · ·

Nope, there is nothing this developer can do as end to get this to work reliably, and we know that one end vendor is working to release driver for support on the controller.

0 Votes 0 · ·