Skip to content

Gamepad Improvements

wolfs requested to merge gamepad-tweaks into next

This branch makes the following changes to gamepads:

  1. Enable XInput by default. Solves the issue where 360 controllers could not use triggers independently. By extension, the default binding for drift was changed to Z-Rudder.
  2. Analog stick menu navigation (thanks to MI)
  3. Map Accelerate and Brake to Menu Accept/Back respectively. Some hardcoded binds were undone as a result of this.
  4. Enable controller hotplugging.
  5. Remove all default d-pad bindings aside from "Show Rankings", which was moved to D-Pad Up, and "Toggle Chat", which was moved to D-Pad Down.

Of the changes mentioned above, all are confirmed to work properly after extensive testing.

While XInput support works as intended, DInput has not received significant testing since the change was made. The last thing I want to do is break DInput in favor of an API that far fewer devices support. In the event that DInput works as it should, things can stay as they are now. If the XInput change causes DInput devices to act up, or messes with their bindings in a significant way, the change should be undone until a solution is found.

Controller hotplugging is confirmed to work for player 1, and only player 1. As of now, when more players are brought into the mix, devices do not get assigned properly and suffer from additional weirdness, such as player 2 having functioning button binds but no working axis binds until the device is reselected. @digiku has brought to my attention the fact that the current state of hotplugging in this branch was a flawed implementation, and has attempted to sort these issues out in vanilla-hotplug-stableid though I have not tested these changes on my end quite yet.

Hotplugging is where I get a little conflicted. I'd very much like to get hotplugging to work for all players, but I don't want it to hold back the rest of these changes. I'll keep trying to sort things out, but in the event that 1.0.2 comes around before hotplugging is finished, I would opt to only keep hotplugging enabled for player 1, since it's confirmed to work properly and is by far the most important of the players to keep this enabled for.

If anyone has different thoughts on how things should be handled here, I'd like to hear them.

(Yes, there are a few commits that don't really belong here that ended up being included as a result of the merge mess I had to sort out in unfuck-gamepads. Not entirely sure what to do about this. I managed to solve the conflicts myself here, but part of me is worried that a separate merge of vanilla into master will result in needing to handle these conflicts again.)

Edited by wolfs

Merge request reports

Loading