diff options
author | missionfloyd <missionfloyd@users.noreply.github.com> | 2023-05-29 23:52:19 -0600 |
---|---|---|
committer | missionfloyd <missionfloyd@users.noreply.github.com> | 2023-05-29 23:52:19 -0600 |
commit | baa81126c485434211cb6d58292f77de00dc2432 (patch) | |
tree | 235057cb299cf02c95b87390e7afe5fa0e802f14 | |
parent | 679e8738759b9aa2678a40d518bf6d67915e98fe (diff) |
Move gamepaddisconnected listener
-rw-r--r-- | javascript/imageviewerGamepad.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/javascript/imageviewerGamepad.js b/javascript/imageviewerGamepad.js index 45cc4cbf..a22c7e6e 100644 --- a/javascript/imageviewerGamepad.js +++ b/javascript/imageviewerGamepad.js @@ -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]); }); /* |