reduce scan delay for better initial detection
This commit is contained in:
parent
62daa08c7a
commit
eaea41db0e
@ -70,7 +70,7 @@ class Gamepad {
|
|||||||
this.helpDelay = 12000;
|
this.helpDelay = 12000;
|
||||||
|
|
||||||
// active gamepad default values
|
// active gamepad default values
|
||||||
this.scanDelay = 500;
|
this.scanDelay = 200;
|
||||||
this.debug = false;
|
this.debug = false;
|
||||||
this.index = null;
|
this.index = null;
|
||||||
this.type = null;
|
this.type = null;
|
||||||
@ -419,11 +419,15 @@ class Gamepad {
|
|||||||
|
|
||||||
// determine gamepad type
|
// determine gamepad type
|
||||||
this.type = this.getType(gamepad);
|
this.type = this.getType(gamepad);
|
||||||
this.identifier = this.identifiers[this.type];
|
|
||||||
this.colorIndex = 0;
|
|
||||||
// ensure a valid gamepad type was discovered
|
// ensure a valid gamepad type was discovered
|
||||||
if (!this.type) return;
|
if (!this.type) return;
|
||||||
|
|
||||||
|
// initial setup of the gamepad
|
||||||
|
this.identifier = this.identifiers[this.type];
|
||||||
|
this.colorIndex = 0;
|
||||||
|
this.changeGamepadColor(this.identifier.colors[this.colorIndex]);
|
||||||
|
|
||||||
// load the HTML template file
|
// load the HTML template file
|
||||||
this.loadTemplate(gamepad);
|
this.loadTemplate(gamepad);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user