fix: use LOGICAL_WIDTH,HEIGHT instead of SCREEN_WIDTH,HEIGHT beucase screen is scaled

This commit is contained in:
2026-01-14 16:13:44 +01:00
parent c005c50081
commit f60b9b21f4
8 changed files with 13 additions and 13 deletions

View File

@@ -59,7 +59,7 @@ const renderFrame = (timestamp: number) => {
const start = Date.now();
// render
ctx.clearRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
ctx.clearRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
ctx.save();
ctx.scale(SCREEN_SCALE, SCREEN_SCALE);