aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/imageviewerGamepad.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-18 07:26:35 +0000
committerGitHub <noreply@github.com>2023-05-18 07:26:35 +0000
commit97e1cf69c04a3c62aa1bb19a14ffc948d9cc6c4e (patch)
tree7a24bdd31580fe0e4bf8d4205b57b55df0a2568d /javascript/imageviewerGamepad.js
parent484948f5c0b755a921c02cccbcacb2684a86a814 (diff)
parentbb431df52bf3dc5e233e42907f2d8f56e4fb6c0c (diff)
downloadstable-diffusion-webui-gfx803-97e1cf69c04a3c62aa1bb19a14ffc948d9cc6c4e.tar.gz
stable-diffusion-webui-gfx803-97e1cf69c04a3c62aa1bb19a14ffc948d9cc6c4e.tar.bz2
stable-diffusion-webui-gfx803-97e1cf69c04a3c62aa1bb19a14ffc948d9cc6c4e.zip
Merge branch 'dev' into master
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;
}