-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ensure gamepads connect automatically to first player without controller #405
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, there's differing levels of indentation in places, such as in LinkDevicesToPlayers.
Each level of indentation should be equivalent to 4 spaces.
} | ||
} | ||
|
||
private List<Tuple<string,string>> getGamepadsDescriptions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetGamepadsDescriptions
@@ -41,6 +46,76 @@ protected virtual void Dispose(bool disposing) | |||
} | |||
} | |||
|
|||
private void removeSDPWhenExternalPadsConnected(List<Tuple<string,string>> availableDevices) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RemoveSdpWhenExternalPadsConnected
|
||
//update Device for current user based on new configuration. | ||
var config = ConfigurationState.Instance.Hid.InputConfig.Value.Find(inputConfig => inputConfig.PlayerIndex == PlayerId); | ||
var device = Devices.FindFirst(d => d.Id==config.Id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply proper spacing.
var config = ConfigurationState.Instance.Hid.InputConfig.Value.Find(inputConfig => inputConfig.PlayerIndex == PlayerId); | ||
var device = Devices.FindFirst(d => d.Id==config.Id); | ||
if (device.HasValue) { | ||
Device=Devices.IndexOf(device); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
This PR aims to manage better controller connection/disconnection.
The aim is to update the the input view when the gamepad is connected or disconnected accordingly.
and to map new gamepad connected to first player without any controller setup.
Also take into account some steamOS specific behavior (remove Steam virtual pad from list of available gamepads).