fixed gamepad refresh to be done only if there is an active gamepad
This commit is contained in:
parent
eb2cd58354
commit
0170909afd
@ -215,13 +215,13 @@ class Gamepad {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateVisualStatus() {
|
updateVisualStatus() {
|
||||||
this.refreshGamepads();
|
|
||||||
|
|
||||||
// ensure that a gamepad is currently active
|
// ensure that a gamepad is currently active
|
||||||
if (!this.activeGamepad) {
|
if (!this.activeGamepad) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.refreshGamepads();
|
||||||
|
|
||||||
requestAnimationFrame(this.updateVisualStatus.bind(this));
|
requestAnimationFrame(this.updateVisualStatus.bind(this));
|
||||||
|
|
||||||
let button;
|
let button;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user