I finally got my hands on an XBox style gamepad and was able to address some long-standing issues that folks have complained about. Being able to put hands on one was very educational.
First, I’ve added two new JoystickAxis constants:
These map to logical IDs .rx and .ry… which in my pile of game controllers seems to map to all non-XBox style gamepads. For XBox they will be remapped in config. The issue is that generic and play station style controllers never seem to report anything but a generic name (even a PS4 controller only shows up as “Wireless Controller”) but I guess most Xbox controllers will have “xbox” in the name somewhere.
Second, along those lines, the joystick remapping support now allows for a regex normalization in joystick name. For example:
…means we can create one button/axis remapping for “XBOX” and anything with the word ‘xbox’ anywhere in its actual name (case insensitive) will match.
I’ve left the old XBox controller configurations in temporarily but I’ve commented them out.
Third, the TestJoystick app has been updated to support the new LEFT_TRIGGER/RIGHT_TRIGGER axes.
On Playstation style controllers, the triggers are axes and also buttons so they get reported both ways. (Buttons 6 and 7 usually) For Xbox controllers, these seem only to be treated as axes… so the test joystick app accounts for this now.
If you build JME from source and have a controller to test, you might consider giving the TestJoystick app a whirl to see if it still works with your game controller after these changes.