Fix const assignment error

This commit is contained in:
Ethan O'Brien 2025-06-09 21:43:37 -05:00
parent 977dd04a0a
commit 48e8adb676
No known key found for this signature in database
GPG Key ID: 7A6E7CCD3BD93AB1

View File

@ -64,7 +64,7 @@ class GamepadHandler {
const val = (axis < 0.01 && axis > -0.01) ? 0 : axis;
const newVal = (gamepad.axes[axisIndex] < 0.01 && gamepad.axes[axisIndex] > -0.01) ? 0 : gamepad.axes[axisIndex];
if (newVal !== val) {
const axis = ['LEFT_STICK_X', 'LEFT_STICK_Y', 'RIGHT_STICK_X', 'RIGHT_STICK_Y'][axisIndex];
let axis = ['LEFT_STICK_X', 'LEFT_STICK_Y', 'RIGHT_STICK_X', 'RIGHT_STICK_Y'][axisIndex];
if (!axis) {
axis = "EXTRA_STICK_" + axisIndex;
}