microsoft / GDK

Microsoft Public GDK
http://aka.ms/gamedevdocs
Other
1.48k stars 99 forks source link

GameInput Not Working With USB XBox Controller #32

Open r2d2Proton opened 1 year ago

r2d2Proton commented 1 year ago

Does GameInput support the USB Xbox(360) controller? The controllers work fine with XInput, which I am going try and use sxs in code. Also, XGameRuntimeInitialize returns (0x87e5001f), which apparently is not considered failed FAILED(hr). By chance, can you point me to a sample in the Windows-Driver-Samples so that I can use as a baseline to create my own for the controllers?

XGameRuntimeInitializeFails

DJm00n commented 9 months ago

By chance, can you point me to a sample in the Windows-Driver-Samples so that I can use as a baseline to create my own for the controllers?

There is no any public official way to add your own XInput compatible controller. But you can create a generic HID gamepad (see vhidmini2 example etc).

Reverse engineered driver exist that can emulate XInput compatible controller programmatically: https://github.com/nefarius/ViGEmBus For example, famous DS4Windows tool is using it under the hood to emulate XInput controller