From 55085c6a5f7488b15b3cb0a321ebe218e1286df5 Mon Sep 17 00:00:00 2001 From: e7d Date: Fri, 4 Sep 2020 09:24:02 +0200 Subject: [PATCH] fix broken buttons refresh --- js/gamepad.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/js/gamepad.js b/js/gamepad.js index 9be57f9..94b569c 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -544,8 +544,6 @@ class Gamepad { this.updateButtons(activeGamepad); this.updateAxes(activeGamepad); - - this.activeGamepad = activeGamepad; } /** @@ -556,10 +554,6 @@ class Gamepad { updateButtons(gamepad) { // update the buttons for (let index = 0; index < gamepad.buttons.length; index++) { - if (this.activeGamepad && this.activeGamepad.buttons[index].value == gamepad.buttons[index].value) { - return; - } - // find the DOM element const $button = this.mapping.buttons[index]; if (!$button) { @@ -589,10 +583,6 @@ class Gamepad { updateAxes(gamepad) { // update the axes for (let index = 0; index < gamepad.axes.length; index++) { - if (this.activeGamepad && this.activeGamepad.axes[index].value == gamepad.axes[index].value) { - return; - } - // find the DOM element const $axis = this.mapping.axes[index]; if (!$axis) {