From 0fd961bd86f33dd33487c56bb639b24cfc788ef1 Mon Sep 17 00:00:00 2001 From: FurryR Date: Sun, 27 Oct 2024 18:22:46 +0800 Subject: [PATCH] fix vsync Signed-off-by: FurryR --- src/engine/tw-frame-loop.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/tw-frame-loop.js b/src/engine/tw-frame-loop.js index 52ddfbcf8aa..aa7054ac372 100644 --- a/src/engine/tw-frame-loop.js +++ b/src/engine/tw-frame-loop.js @@ -83,6 +83,7 @@ class FrameLoop { this.runtime.screenRefreshTime = renderTime - this._lastRenderTime; // Screen refresh time (from rate) this._lastRenderTime = renderTime; } else if ( + this.framerate === 0 || renderTime - this._lastRenderTime >= this.runtime.currentStepTime ) {