From 2061cef98d6711e381e8eabc7d43c9bb53ae7a13 Mon Sep 17 00:00:00 2001
From: Kavin Muralikrishnan <921563@lcps.org>
Date: Fri, 18 Oct 2024 17:20:43 -0400
Subject: [PATCH] fixed axis values
---
index.html | 16 ++++++++--------
index.js | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
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"]');