Hacker News new | ask | show | jobs
by grumbel 40 days ago
It's a bit more tricky, a Generic HID just gives you a DirectInput device, while reasonably modern games use Xinput. Microsoft never provided a way to map DirectInput devices to Xinput. For Xinput to work a Microsoft specific USB protocol is needed, not a Generic HID device. Many third party controllers have a switch or button combination to switch between XInput and DirectInput modes for this reason.

Microsoft has a new API with GameInput that addresses this situation and allows mapping Generic HID devices onto game controller via config file, but it doesn't work retroactively, it only works for games that use the new GameInput API.

Valve could of course provide a way to switch and emulate other protocols too, just like other third party vendors do, but there is no USB standard that makes things "just work" in Windows when it comes to gamepads, you always need extra drivers, USB modes or other hacks.

On consoles the situation is even worse, modern consoles deliberately lock out any unlicensed third party controller. Playstation3 was the first and last console that supported standard USB controller, while PS5 doesn't even support PS4 controller.

1 comments

Just out of curiosity, what modern game won't function with a generic HID game controller?
Most of them I would assume. Everything from 2006 forward started to use Xinput. DirectInput support only shows up in racing sims, flight simulators, fighting games and emulation. But all the big AAA games have been built around Xbox360 style control schemes for two decades.

But it's all a bit theoretical, since most modern gamepads have Xinput support, and the generic HID devices are mostly flightsticks or SNES-style gamepads that wouldn't have enough buttons and axis for modern games in the first place. Another issue is that most games don't offer input remapping for gamepads.

But with SteamInput and homebrew tools like x360ce there are many ways to make generic USB devices compatible Xinput, so it's not like you can't use them. It's just not something that works out of the box.

That may explain it then. I use flight controllers and driving controllers. Both just show up as generic HID devices and both are easily used in the games I play.