fix broken buttons refresh

This commit is contained in:
e7d 2020-09-04 09:24:02 +02:00
parent d7cc861f2b
commit 55085c6a5f
No known key found for this signature in database
GPG Key ID: F320BE007C0B8881

View File

@ -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) {