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() {
|
||||
this.refreshGamepads();
|
||||
|
||||
// ensure that a gamepad is currently active
|
||||
if (!this.activeGamepad) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.refreshGamepads();
|
||||
|
||||
requestAnimationFrame(this.updateVisualStatus.bind(this));
|
||||
|
||||
let button;
|
||||
|
Loading…
x
Reference in New Issue
Block a user