From 279b9c5fc8643afa0890020fb983f5f27942dae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 26 Mar 2024 14:09:07 +0100 Subject: [PATCH] fix: correct screen resolution --- src/lib/ScreenInfo.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ScreenInfo.svelte b/src/lib/ScreenInfo.svelte index 1656c6c..d502e2f 100644 --- a/src/lib/ScreenInfo.svelte +++ b/src/lib/ScreenInfo.svelte @@ -7,8 +7,8 @@ let windowResolution = ''; function updateResolution() { - const realWidth = Math.round(screen.width * window.devicePixelRatio); - const realHeight = Math.round(screen.height * window.devicePixelRatio); + const realWidth = Math.round(screen.width); + const realHeight = Math.round(screen.height); const windowWidth = Math.round(window.innerWidth * window.devicePixelRatio); const windowHeight = Math.round(window.innerHeight * window.devicePixelRatio); screenResolution = `${realWidth} x ${realHeight}`;