added default position for analogue sticks when no controller is connected

This commit is contained in:
2025-05-09 20:29:22 +02:00
parent 6271671fee
commit 7bd5908707
+2
View File
@@ -49,6 +49,8 @@ void setup() {
void loop() { void loop() {
if (!(error == 0 && type == 0)) { if (!(error == 0 && type == 0)) {
checkControllerConnection(); checkControllerConnection();
XInput.setJoystick(JOY_LEFT, 0, 0);
XInput.setJoystick(JOY_RIGHT, 0, 0);
delay(50); delay(50);
return; return;
} }