From 007cbd821522e5e3d3bf1db5df838b23fb5939a5 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Tue, 20 Jan 2026 19:18:53 +0100 Subject: [PATCH] fix(screen): clearRect wasn't affected by scaling --- app/components/Screen.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Screen.vue b/app/components/Screen.vue index 25d8ad2..ba68fc8 100644 --- a/app/components/Screen.vue +++ b/app/components/Screen.vue @@ -59,11 +59,11 @@ const renderFrame = (timestamp: number) => { const start = Date.now(); // render - ctx.clearRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT); - ctx.save(); ctx.scale(SCREEN_SCALE, SCREEN_SCALE); + ctx.clearRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT); + const sortedCallbacks = Array.from(renderCallbacks.entries()) .sort((a, b) => a[1] - b[1]) .map(([callback]) => callback);