diff --git a/index.html b/index.html index b41a94e..a4d55ea 100644 --- a/index.html +++ b/index.html @@ -23,36 +23,36 @@
Axis 0
-
127
+
127
Axis 1
-
127
+
127
Axis 2
-
127
+
127
Axis 3
-
127
+
127
Axis 0
-
127
+
127
Axis 1
-
127
+
127
Axis 2
-
127
+
127
Axis 3
-
127
+
127
diff --git a/index.js b/index.js index 2045f6d..71cb8bf 100644 --- a/index.js +++ b/index.js @@ -595,7 +595,7 @@ function createGamepadAgent(gamepadNum) { return getGamepads().find(gamepad => gamepad.index == gamepadNum); } - var axisValueElements = document.querySelectorAll('[id^="axisValue"]'); + var axisValueElements = document.querySelectorAll('[id^="'+gamepadNum+'axisValue"]'); var barElements = document.querySelectorAll('[id^="'+gamepadNum+'bar"]'); var buttonElements = document.querySelectorAll('[id^="'+gamepadNum+'buttonDesktop"]');