Skip to content
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

Add new GamePad.GetState() overloads to support different dead zone modes #6467

Merged
merged 3 commits into from
Oct 5, 2018
Merged

Add new GamePad.GetState() overloads to support different dead zone modes #6467

merged 3 commits into from
Oct 5, 2018

Conversation

mrhelmut
Copy link
Contributor

@mrhelmut mrhelmut commented Oct 3, 2018

Hello !

This is a proposal for new public overloads to apply different GamePadDeadZone for each thumb sticks.

public static GamePadState GetState(PlayerIndex playerIndex, GamePadDeadZone leftDeadZoneMode, GamePadDeadZone rightDeadZoneMode)

public static GamePadState GetState(int index, GamePadDeadZone leftDeadZoneMode, GamePadDeadZone rightDeadZoneMode)

Copy link
Contributor

@Jjagg Jjagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great PR! Good to go IMO :)

cc @tomspilman just because of the API change

@Jjagg
Copy link
Contributor

Jjagg commented Oct 5, 2018

Thanks @mrhelmut! Mergin'!

@Jjagg Jjagg merged commit e5dbf63 into MonoGame:develop Oct 5, 2018
@HopefulToad
Copy link
Contributor

Why didn't this PR add a separate overload instead of replacing the original overload that had just one deadzone type specified for both sticks? The way it is now, it's a breaking change. Both overloads could have existed, one where one deadzone type is specified for both sticks, and one where separate deadzone types are specified for each stick.

@mrhelmut
Copy link
Contributor Author

You're probably referring to the internal/private methods, but the public API got extended, not replaced.

@HopefulToad
Copy link
Contributor

Ah! Right you are, I didn't notice that the methods where the overload was being replaced were private, and that there was a public overload added. My bad.

@mrhelmut mrhelmut deleted the gamepad branch December 3, 2018 08:47
@tomspilman tomspilman added this to the 3.7.1 Release milestone Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants