From 7f7647c489c74efa78c66d2b763988f4307adce8 Mon Sep 17 00:00:00 2001 From: Luke A Date: Fri, 4 Oct 2024 12:45:09 -0400 Subject: [PATCH] PS4 touchpad boolean fix (#1186) --- src/drivers/ps4/PS4Driver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/ps4/PS4Driver.cpp b/src/drivers/ps4/PS4Driver.cpp index 26e44259c..f40134d1d 100644 --- a/src/drivers/ps4/PS4Driver.cpp +++ b/src/drivers/ps4/PS4Driver.cpp @@ -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;