reduced gamepad scan delay
This commit is contained in:
parent
8a701d1fda
commit
01f8829f0c
@ -9,6 +9,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
var haveEvents = 'ongamepadconnected' in window;
|
var haveEvents = 'ongamepadconnected' in window;
|
||||||
|
var scanGamepadsDelay = 1000;
|
||||||
var gamepads = {};
|
var gamepads = {};
|
||||||
var $gamepad = $('.gamepad');
|
var $gamepad = $('.gamepad');
|
||||||
var $nogamepad = $('.no-gamepad');
|
var $nogamepad = $('.no-gamepad');
|
||||||
@ -104,7 +105,7 @@
|
|||||||
displayGamepadHelp();
|
displayGamepadHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(scanGamepads, 500);
|
setInterval(scanGamepads, scanGamepadsDelay);
|
||||||
function scanGamepads() {
|
function scanGamepads() {
|
||||||
if (null !== activeGamepadIndex) {
|
if (null !== activeGamepadIndex) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user