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

XboxControllerHandlerBase fixes #1521

Conversation

keveleigh
Copy link
Contributor

Overview

Simplified the state machine in XboxControllerHandlerBase to reduce confusion and cases where states may conflict with each other.
Also resolved a bug where GamePadHandlerBase was registering as a global listener twice, thus receiving all events from the InputManager twice.

Changes

Fixes an issue where it'd get stuck in a HoldStarted or
HoldCompletedState, due to incorrect logic in cancelling coroutines. I
also removed several states that really didn't mean anything, along with
removing the tracking bools that duplicated the GestureState enum.
}

if (XboxControllerMapping.GetButton_Up(SelectButton, eventData))
if (eventData.XboxA_Up)
Copy link
Contributor

Choose a reason for hiding this comment

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

this removes the customization of the selection buttons

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh yes, this was left over from when I was investigating the double events. Reverting.

@@ -25,9 +25,8 @@ public class XboxControllerHandlerTest : XboxControllerHandlerBase
private Vector3 newPosition;
private Vector3 newRotation;

protected override void Start()
private void Start()
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably make this protected virtual in case someone wants to add onto the functionality of this class

Copy link
Contributor Author

@keveleigh keveleigh Dec 14, 2017

Choose a reason for hiding this comment

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

Since it's a test class, I feel like that's unlikely, but I'll change it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point

@keveleigh keveleigh merged commit b26bf7a into microsoft:v2017.2.0.1-Stabilization Dec 14, 2017
@keveleigh keveleigh deleted the XboxControllerHandlerBaseFixes branch December 14, 2017 21:21
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.

None yet

3 participants