Skip to content

Commit

Permalink
Fix[gamepad]: fix logic issue with toggleable gamepad buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell committed Sep 22, 2024
1 parent 366f181 commit b236447
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b236447

Please sign in to comment.