From 9dd34f614252070afa89256b8efdbf37a27219af Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Fri, 5 Jan 2024 02:26:59 +0530 Subject: [PATCH] fix(reggresion): limit fps setting: max fps wasn't calculating correctly --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 001481ce5..fb8bf4ad0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -81,7 +81,7 @@ export async function getScreenRefreshRate (): Promise { const fps = Math.floor(1000 * 10 / (DOMHighResTimeStamp - t0)) if (!callbackTriggered || fps > 1000) { - resolve(Math.max(fps, 1000)/* , DOMHighResTimeStampCollection */) + resolve(Math.min(fps, 1000)/* , DOMHighResTimeStampCollection */) } callbackTriggered = true