Skip to content

Commit

Permalink
PS4 touchpad boolean fix (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
arntsonl authored Oct 4, 2024
1 parent 995f6ce commit 7f7647c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/ps4/PS4Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ void PS4Driver::process(Gamepad * gamepad) {
} else if (pointOneTouched && touchpadData.p1.unpressed) {
pointOneTouched = false;
}
if (!pointTwoTouched && touchpadData.p2.unpressed) {
if (!pointTwoTouched && !touchpadData.p2.unpressed) {
touchCounter = (touchCounter < PS4_TP_MAX_COUNT ? touchCounter+1 : 0);

touchpadData.p2.counter = touchCounter;

pointTwoTouched = true;
} else if (pointTwoTouched && touchpadData.p1.unpressed) {
} else if (pointTwoTouched && touchpadData.p2.unpressed) {
pointTwoTouched = false;
}
ps4Report.touchpad_data = touchpadData;
Expand Down

0 comments on commit 7f7647c

Please sign in to comment.