[] skyspy: fix button handling.

pull/3507/head
Pavel Machek 2024-06-20 22:11:05 +02:00
parent ab0b4cbb45
commit a64efa4d1f
1 changed files with 7 additions and 0 deletions

View File

@ -320,10 +320,17 @@ function onSwipe(dir) {
nextScreen(); nextScreen();
} }
var last_b = 0;
function touchHandler(d) { function touchHandler(d) {
let x = Math.floor(d.x); let x = Math.floor(d.x);
let y = Math.floor(d.y); let y = Math.floor(d.y);
if (d.b != 1 || last_b != 0) {
last_b = d.b;
return;
}
last_b = d.b;
if ((x<h/2) && (y<w/2)) if ((x<h/2) && (y<w/2))
adj_time = 1; adj_time = 1;