diff --git a/js/gamepad.js b/js/gamepad.js index c0054ee..1b395fd 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -215,13 +215,13 @@ class Gamepad { } updateVisualStatus() { - this.refreshGamepads(); - // ensure that a gamepad is currently active if (!this.activeGamepad) { return; } + this.refreshGamepads(); + requestAnimationFrame(this.updateVisualStatus.bind(this)); let button;