From a3ea853274fdbc6ef62fe41ba76a8d7b1c0b5891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Ferrand?= Date: Thu, 4 May 2017 10:45:14 +0200 Subject: [PATCH 1/5] moved "no gamepad" information to top --- css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index b6af9b3..fa3fe96 100644 --- a/css/main.css +++ b/css/main.css @@ -4,7 +4,7 @@ body { } .no-gamepad { position: absolute; - bottom: 0; + top: 20px; display: none; width: 100vw; line-height: 2em; From 499c48457117969b8f94c095ea36ebd0ebd6b1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Ferrand?= Date: Thu, 4 May 2017 10:50:00 +0200 Subject: [PATCH 2/5] improved "no gamepad" message --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 49063df..b3d9019 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ -
No active gamepad. Press H to see how it works.
+
No active gamepad detected. Press H to read instructions.

Help

From 8a701d1fda80a6f987bfef7eb71dc5003a539348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Ferrand?= Date: Thu, 4 May 2017 10:53:15 +0200 Subject: [PATCH 3/5] reduced "no gamepad" help message display delay --- js/gamepad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/gamepad.js b/js/gamepad.js index 5596ffd..48bb1bd 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -24,7 +24,7 @@ } }; var gamepadHelpTimeout = null; - var gamepadHelpDelay = 10000; + var gamepadHelpDelay = 5000; var activeGamepadIndex = null; var activeGamepadType = null; var activeGamepadIdentifier = null; From 01f8829f0c2883492c851d12596f9422a67c81f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Ferrand?= Date: Thu, 4 May 2017 10:59:29 +0200 Subject: [PATCH 4/5] reduced gamepad scan delay --- js/gamepad.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/gamepad.js b/js/gamepad.js index 48bb1bd..434f0e7 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -9,6 +9,7 @@ }; var haveEvents = 'ongamepadconnected' in window; + var scanGamepadsDelay = 1000; var gamepads = {}; var $gamepad = $('.gamepad'); var $nogamepad = $('.no-gamepad'); @@ -104,7 +105,7 @@ displayGamepadHelp(); } - setInterval(scanGamepads, 500); + setInterval(scanGamepads, scanGamepadsDelay); function scanGamepads() { if (null !== activeGamepadIndex) { return; From 0b1a9fa0f4293fb99c4d97eb4af31a0627ce444e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Ferrand?= Date: Thu, 4 May 2017 11:00:49 +0200 Subject: [PATCH 5/5] removed static cache busters --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index b3d9019..cb97c27 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,8 @@ - - + +
No active gamepad detected. Press H to read instructions.
@@ -58,6 +58,6 @@
- +