From 199612e93e8d1a956a8876560030818f76b67acd Mon Sep 17 00:00:00 2001 From: Fred Date: Sun, 15 Feb 2015 19:56:17 +0000 Subject: [PATCH] bug fix: would only detect first XBOX button press --- XBOXONE.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/XBOXONE.cpp b/XBOXONE.cpp index 69e1a40e..9be283a0 100644 --- a/XBOXONE.cpp +++ b/XBOXONE.cpp @@ -262,10 +262,10 @@ void XBOXONE::readReport() { ButtonState |= XBOX_BUTTONS[XBOX]; } else { - ButtonState &= XBOX_BUTTONS[XBOX]; + ButtonState &= ~XBOX_BUTTONS[XBOX]; } if(ButtonState != OldButtonState) { - ButtonClickState = ButtonState & ~OldButtonState; // Update click state variable, but don't include the two trigger buttons L2 and R2 + ButtonClickState = ButtonState & ~OldButtonState; // Update click state variable OldButtonState = ButtonState; } } @@ -296,7 +296,7 @@ void XBOXONE::readReport() { ButtonClickState = ButtonState & ~OldButtonState; // Update click state variable OldButtonState = ButtonState; } - + // handle click detection for triggers if (triggerValue[0] != triggerValueOld[0]) { triggerValueOld[0] = triggerValue[0]; L2Clicked = true;