From d0d3ad3766729d912c33d115d49fd1cc9b32c50b Mon Sep 17 00:00:00 2001 From: Onatron Date: Sat, 24 May 2025 13:25:48 -0400 Subject: [PATCH] Fix for a gamepad bug where action and undo check for 'left joystick down' and 'right joystick right' instead of the states of RT and LT. --- src/js/inputoutput.js | 4 ++-- src/standalone_inlined.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/inputoutput.js b/src/js/inputoutput.js index 04bf9b37..29819367 100644 --- a/src/js/inputoutput.js +++ b/src/js/inputoutput.js @@ -638,14 +638,14 @@ function pollGamepads() { keyPressed(82); // restart } if(buttonCheck(gamepad.buttons, 1) // B - || axisCheck(gamepad.axes, 2, 1)) { // LT + || buttonCheck(gamepad.buttons, 6)) { // LT keyPressed(90); // undo } if(buttonCheck(gamepad.buttons, 2) // X || buttonCheck(gamepad.buttons, 0) // A || buttonCheck(gamepad.buttons, 5) // RB - || axisCheck(gamepad.axes, 1, 1)) { // RT + || buttonCheck(gamepad.buttons, 7)) { // RT keyPressed(88); // action } diff --git a/src/standalone_inlined.txt b/src/standalone_inlined.txt index 30c717d1..9a7a9aa3 100644 --- a/src/standalone_inlined.txt +++ b/src/standalone_inlined.txt @@ -17579,14 +17579,14 @@ function pollGamepads() { keyPressed(82); // restart } if(buttonCheck(gamepad.buttons, 1) // B - || axisCheck(gamepad.axes, 2, 1)) { // LT + || buttonCheck(gamepad.buttons, 6)) { // LT keyPressed(90); // undo } if(buttonCheck(gamepad.buttons, 2) // X || buttonCheck(gamepad.buttons, 0) // A || buttonCheck(gamepad.buttons, 5) // RB - || axisCheck(gamepad.axes, 1, 1)) { // RT + || buttonCheck(gamepad.buttons, 7)) { // RT keyPressed(88); // action }