mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-10 13:16:04 -04:00
Fix[gamepad]: fix logic issue with toggleable gamepad buttons
This commit is contained in:
parent
366f181533
commit
b236447c42
@ -10,7 +10,8 @@ public class GamepadButton extends GamepadEmulatedButton {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDownStateChanged(boolean isDown) {
|
protected void onDownStateChanged(boolean isDown) {
|
||||||
if(isToggleable && isDown){
|
if(isToggleable) {
|
||||||
|
if(!isDown) return;
|
||||||
mIsToggled = !mIsToggled;
|
mIsToggled = !mIsToggled;
|
||||||
Gamepad.sendInput(keycodes, mIsToggled);
|
Gamepad.sendInput(keycodes, mIsToggled);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user