From c7c2620217a8319b0938628e8a190df7078e935d Mon Sep 17 00:00:00 2001 From: kade-github <26305836+Kade-github@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:13:41 -0700 Subject: [PATCH] Set vsync on launch (might need to be set elsewhere too) --- source/Main.hx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/Main.hx b/source/Main.hx index c0a85d315..8ffbe724f 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -13,6 +13,7 @@ import openfl.events.Event; import openfl.Lib; import openfl.media.Video; import openfl.net.NetStream; +import funkin.util.WindowUtil; /** * The main class which initializes HaxeFlixel and starts the game in its initial state. @@ -67,6 +68,8 @@ class Main extends Sprite funkin.Preferences.lockedFramerateFunction = untyped js.Syntax.code("window.requestAnimationFrame"); #end + WindowUtil.setVSyncMode(funkin.Preferences.vsyncMode); + if (hasEventListener(Event.ADDED_TO_STAGE)) { removeEventListener(Event.ADDED_TO_STAGE, init);