From e78d3ecf8faced6509159595d1bd5a4f471a2d6d Mon Sep 17 00:00:00 2001 From: KarimAkra Date: Fri, 18 Apr 2025 14:47:56 +0300 Subject: [PATCH] remove VSync option from mobile --- source/funkin/ui/options/PreferencesMenu.hx | 3 ++- source/funkin/util/WindowUtil.hx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/funkin/ui/options/PreferencesMenu.hx b/source/funkin/ui/options/PreferencesMenu.hx index 68048d079..145cd6725 100644 --- a/source/funkin/ui/options/PreferencesMenu.hx +++ b/source/funkin/ui/options/PreferencesMenu.hx @@ -136,7 +136,8 @@ class PreferencesMenu extends Page #end // disabled on macos due to "error: Late swap tearing currently unsupported" - #if !mac + // disable on mobile since it barely has any effect + #if !(mac || mobile) createPrefItemEnum('VSync', 'If enabled, game will attempt to match framerate with your monitor.', [ "Off" => WindowVSyncMode.OFF, "On" => WindowVSyncMode.ON, diff --git a/source/funkin/util/WindowUtil.hx b/source/funkin/util/WindowUtil.hx index b8a807af0..e2a627dfd 100644 --- a/source/funkin/util/WindowUtil.hx +++ b/source/funkin/util/WindowUtil.hx @@ -163,7 +163,8 @@ class WindowUtil public static function setVSyncMode(value:lime.ui.WindowVSyncMode):Void { // vsync crap dont worky on mac rn derp - #if !mac + // and for mobile it isn't really needed + #if !(mac || mobile) var res:Bool = FlxG.stage.application.window.setVSyncMode(value); // SDL_GL_SetSwapInterval returns the value we assigned on success, https://wiki.libsdl.org/SDL2/SDL_GL_GetSwapInterval#return-value.