From b236447c420f67cdf06c1d653c11ab3f6d545fb2 Mon Sep 17 00:00:00 2001 From: Maksim Belov Date: Sun, 22 Sep 2024 18:59:00 +0300 Subject: [PATCH] Fix[gamepad]: fix logic issue with toggleable gamepad buttons --- .../kdt/pojavlaunch/customcontrols/gamepad/GamepadButton.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/gamepad/GamepadButton.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/gamepad/GamepadButton.java index 4d2d9aaba5..b80324527c 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/gamepad/GamepadButton.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/gamepad/GamepadButton.java @@ -10,7 +10,8 @@ public class GamepadButton extends GamepadEmulatedButton { @Override protected void onDownStateChanged(boolean isDown) { - if(isToggleable && isDown){ + if(isToggleable) { + if(!isDown) return; mIsToggled = !mIsToggled; Gamepad.sendInput(keycodes, mIsToggled); return;