This library uses DirectInput for gamepad events in Win32. More...
![]() |
This library uses DirectInput for gamepad events in Win32.
Surprisingly, DirectInput isn't very good for gamepads. Microsoft's most popular gamepad, the XBox 360 controller, is weakly supported with DirectInput: there are no events for the big green X button, and both hardware triggers are mysteriously mapped to a single software potentiometer for no good reason that I can tell. Playstation 3 controllers don't work at all. Despite its problems with the most current generation of controllers, I've had good luck with Playstation 2 and Nintendo 64 controllers under DirectInput (you'll need USB adapters).
Also, Microsoft itself seems uncertain about the future of its own input APIs. Do some web searches for XInput vs. DirectInput to find out the current status of their support. Given that XInput appears to be the only API receiving updates, and it only supports XBox 360 controllers, it is possible that the DirectX APIs will only support Microsoft hardware in the future. At the moment there is no good alternative for gamepad APIs on Microsoft platforms.