fix(settings/touchScreen/tapTap): floor crosshair position

This commit is contained in:
2026-02-08 19:58:37 +01:00
parent ba3ab6eaad
commit 8e3bf01828

View File

@@ -360,19 +360,22 @@ onRender((ctx) => {
} }
// draw crosshair // draw crosshair
const cx = Math.floor(x);
const cy = Math.floor(y);
ctx.fillStyle = "#494949"; ctx.fillStyle = "#494949";
ctx.fillRect(x, 0, 1, LOGICAL_HEIGHT); ctx.fillRect(cx, 0, 1, LOGICAL_HEIGHT);
ctx.fillRect(0, y, LOGICAL_WIDTH, 1); ctx.fillRect(0, cy, LOGICAL_WIDTH, 1);
ctx.fillStyle = "#fb0000"; ctx.fillStyle = "#fb0000";
ctx.fillRect(x - 4, y - 4, 9, 9); ctx.fillRect(cx - 4, cy - 4, 9, 9);
ctx.fillStyle = "#fbfafa"; ctx.fillStyle = "#fbfafa";
ctx.fillRect(x - 2, y - 2, 5, 5); ctx.fillRect(cx - 2, cy - 2, 5, 5);
ctx.fillStyle = "#fb0000"; ctx.fillStyle = "#fb0000";
ctx.fillRect(x, y - 1, 1, 3); ctx.fillRect(cx, cy - 1, 1, 3);
ctx.fillRect(x - 1, y, 3, 1); ctx.fillRect(cx - 1, cy, 3, 1);
}, 0); }, 0);
onRender((ctx) => { onRender((ctx) => {