From cc1fa68387e07c95de0ffbb266458c72bdf044a0 Mon Sep 17 00:00:00 2001 From: e7d Date: Sun, 14 May 2017 11:33:37 +0200 Subject: [PATCH] added active gamepad related checks --- js/gamepad.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/gamepad.js b/js/gamepad.js index 16b2bec..14dfc2e 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -158,6 +158,8 @@ class Gamepad { // ensure that a gamepad is currently active if (!this.activeGamepad) { + this.displayGamepadHelp(); + return; } @@ -175,6 +177,10 @@ class Gamepad { } } + if (!this.activeGamepadType) { + return; + } + let button; let axis; this.hideGamepadHelp();