Fixed no add gamepad if this length >= 1

This commit is contained in:
Eugene Serb
2022-06-30 20:26:21 +03:00
parent e577886cdf
commit 925ca7001a

View File

@@ -53,7 +53,7 @@
window.addEventListener('gamepaddisconnected', () => this.deleteGamepad(event)); window.addEventListener('gamepaddisconnected', () => this.deleteGamepad(event));
}, },
addGamepad(event) { addGamepad(event) {
if (this.gamepads.length > 1) { if (this.gamepads.length >= 1) {
return; return;
} else { } else {
this.gamepads.push(new Gamepad(event.gamepad)); this.gamepads.push(new Gamepad(event.gamepad));