Move gamepaddisconnected listener

This commit is contained in:
missionfloyd 2023-05-29 23:52:19 -06:00
parent 679e873875
commit baa81126c4

View File

@ -24,7 +24,10 @@ window.addEventListener('gamepadconnected', (e) => {
isWaiting = false;
}
}, 10);
window.addEventListener('gamepaddisconnected', (e) => clearInterval(gamepads[e.gamepad.index]));
});
window.addEventListener('gamepaddisconnected', (e) => {
clearInterval(gamepads[e.gamepad.index]);
});
/*