0
\$\begingroup\$

I'm currently writing an interface driver for my Moga Power Pro controller on Windows. I'd like to release it for others to use, but first I have some questions on expected default mappings for the triggers.

joy.cpl panel

Specifically, how do other gamepads map the triggers, as viewed from the Windows joy.cpl Game Controllers panel? And which axis are they normally mapped to? Some axes default to the center value, others can default to zero, and the different axes might be treated differently inside games. Triggers are naturally zero-to-full, but I don't want someone to download my interface driver and suddenly find the triggers are always active because Windows thinks the axis ought to be centered and reads it always tilted to one side.

I realize every controller is different, so this may be a bit subjective, but the closer I can set it to some form of standard the better. Or is this something I shouldn't even need to worry about, that games which expect a trigger input will handle on their own?

\$\endgroup\$
0
\$\begingroup\$

One of the problems with the DirectInput API was that it was so hardware agonistic as to be difficult for game designers to understand how to create control schemes. Previous attempts to mitigate the DirectInput 'control mapping' problem through things like Action Mapper didn't really pan out.

This is arguably the biggest benefit of the Xbox Common Controller initiative where PC game designers could rally around a single gamepad at least for their default control schemes. Ideally they were using XINPUT instead of DirectInput, but at least they had some idea of what the player might have in their hands.

The Xbox 360 Controller / Xbox One Controller on PC are exposed as HID devices for DirectInput to help support legacy applications as well as through the XINPUT API or on Windows 10 the new Windows.Gaming.Input API. For the triggers, the HID report makes an assumption that was made so that steering wheel games would work as expected: The left & right triggers are combined as follows for the Z axis:

0x0800 - right trigger + left trigger

DirectInput and XUSB Devices, XINPUT and Windows 8, and DirectX Tool Kit: Now with GamePads

\$\endgroup\$
  • \$\begingroup\$ Combined in one axis! That sounds like it would create as many problems as it solves. I suppose I'd be best off expanding on a toggle that lets the user choose how the triggers behave. (That or petition the developer of the vJoy driver to add XInput support.) \$\endgroup\$ – Zel Dec 10 '15 at 23:05
  • \$\begingroup\$ Not centering the Z caused a lot of games to go nutty that used it. Most games just use X/Y axis and Rx/Ry anyhow. \$\endgroup\$ – Chuck Walbourn Dec 11 '15 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.