I'm having an issue getting a gamepad to work properly. Windows' input-devices system has always confused me, but after some research I've gathered the following:
- XInput is the latest/most widely used API in DirectX for gamepad input
- DirectInput is an older API that isn't as popular/used (thanks to XInput being easier and faster to set up)
- XInput ONLY supports the Xbox controllers (Xbox 360 and probably Xbox One as well)
- DirectInput supports all types of input devices, including generic HID-compliant gamepads and Xbox controllers (although with less features than through XInput, like headset support)
My issue involves getting a Bluetooth gamepad (Amazon Fire TV Game Controller) to work in games on Windows. Obviously since it isn't an Xbox 360 controller, getting it to work on an XInput-only game is going to require a work-around. This project seems to do the trick almost perfectly, as it enables all input devices to emulate Xbox360 input and therefore make them compatible with XInput.
However, I've run into a few snags and I can't really tell whose fault they are, or how to fix them. One issue is that the L/R triggers are not detected at all. Going into the "Devices and Printers" menu and clicking on the "Game controller settings" for my controller allows me to test the inputs via this familiar screen:
Pressing the triggers does not do anything at all. Furthermore, if you notice, there are 15 input buttons. This is correct, as the controller I'm testing does have 15 buttons, however 4 of those buttons are media buttons that control the OS on their own. For example, pressing the home button on the controller will open my internet browser and take me to my homepage. Pressing the other media buttons seemingly does nothing.
My questions are:
How do I get the triggers to work? Is this a driver issue? I thought HID-compliant devices were supposed to just work. If Windows detected all 15 buttons, two analog sticks and one D-Pad, why couldn't it detect the two triggers? Do HID-compliant gamepads not support analog triggers, or is this a bug/issue either with the controller itself or Windows' gamepad driver?
How can I take control of the 4 media buttons on the device? Having a button on a gamepad that takes me to my internet browser is pretty useless and annoying.
If a custom driver is absolutely required for this, would it be possible to write one myself, having no connection with or help from the manufacturer?