From 0a8edf329897f2b0ce1396230e023216fb02d1fc Mon Sep 17 00:00:00 2001 From: e7d Date: Sun, 14 May 2017 11:15:53 +0200 Subject: [PATCH] simplified the getActiveGamepad method --- js/gamepad.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/gamepad.js b/js/gamepad.js index 94ddb52..54f61b6 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -97,11 +97,7 @@ class Gamepad { } getActiveGamepad() { - if (null === this.activeGamepadIndex) { - return null; - } - - return this.gamepads[this.activeGamepadIndex]; + return this.activeGamepad; } addGamepad(gamepad) {