From 101c2d526f7621bfe3f9cfc63bfc3075e30940a3 Mon Sep 17 00:00:00 2001 From: e7d Date: Sun, 14 May 2017 15:21:10 +0200 Subject: [PATCH] fixed gamepad type determination order --- js/gamepad.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/gamepad.js b/js/gamepad.js index 7b6c5a3..8149901 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -223,12 +223,12 @@ class Gamepad { // determine gamepad type this.activeGamepadType = null; - if (this.params.gamepadType) { - // if the gamepad type is set through params, apply it - this.activeGamepadType = this.params.gamepadType; - } else if (this.debug) { + if (this.debug) { // if the debug option is active, use the associated template this.activeGamepadType = 'debug'; + } else if (this.params.gamepadType) { + // if the gamepad type is set through params, apply it + this.activeGamepadType = this.params.gamepadType; } else { // else, determine the template to use from the gamepad identifier for (let gamepadType in this.gamepadIdentifiers) {