aboutsummaryrefslogtreecommitdiff
path: root/javascript/imageviewerGamepad.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-22 07:15:34 +0300
committerGitHub <noreply@github.com>2023-05-22 07:15:34 +0300
commit8137bdba61fd57cc1ddae801f6080d51e13d70c5 (patch)
treec5a02e9f9ae57c9f0ff8499379c6cc61a97c094e /javascript/imageviewerGamepad.js
parenta862428902c4aecde8852761c3a4d95c196885cb (diff)
parent3366e494a1147e570d8527eea19da88edb3a1e0c (diff)
Merge branch 'dev' into text-drag-fix
Diffstat (limited to 'javascript/imageviewerGamepad.js')
-rw-r--r--javascript/imageviewerGamepad.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/javascript/imageviewerGamepad.js b/javascript/imageviewerGamepad.js
index 6297a12b..31d226de 100644
--- a/javascript/imageviewerGamepad.js
+++ b/javascript/imageviewerGamepad.js
@@ -1,7 +1,7 @@
window.addEventListener('gamepadconnected', (e) => {
const index = e.gamepad.index;
let isWaiting = false;
- setInterval(async () => {
+ setInterval(async() => {
if (!opts.js_modal_lightbox_gamepad || isWaiting) return;
const gamepad = navigator.getGamepads()[index];
const xValue = gamepad.axes[0];
@@ -14,7 +14,7 @@ window.addEventListener('gamepadconnected', (e) => {
}
if (isWaiting) {
await sleepUntil(() => {
- const xValue = navigator.getGamepads()[index].axes[0]
+ const xValue = navigator.getGamepads()[index].axes[0];
if (xValue < 0.3 && xValue > -0.3) {
return true;
}