Minor fix

This commit is contained in:
redphx 2023-08-12 17:56:23 +07:00
parent c520fde438
commit 0722e02ab0

View File

@ -168,7 +168,7 @@ class TouchController {
static #dispatchMessage(msg) { static #dispatchMessage(msg) {
TouchController.#dataChannel && setTimeout(() => { TouchController.#dataChannel && setTimeout(() => {
TouchController.#dataChannel.dispatchEvent(msg); TouchController.#dataChannel.dispatchEvent(msg);
}, 100); }, 10);
} }
static setup() { static setup() {
@ -231,7 +231,7 @@ class TouchController {
// Fix sometimes the touch controller doesn't show at the beginning // Fix sometimes the touch controller doesn't show at the beginning
dataChannel.addEventListener('open', e => { dataChannel.addEventListener('open', e => {
TouchController.#show(); setTimeout(TouchController.#show, 1000);
}); });
dataChannel.addEventListener('message', msg => { dataChannel.addEventListener('message', msg => {