Skip to content

Disable V-Sync option on web builds #5062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/funkin/ui/options/PreferencesMenu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ class PreferencesMenu extends Page<OptionsState.OptionsMenuPageName>
Preferences.autoFullscreen = value;
}, Preferences.autoFullscreen);

#if web
createPrefItemCheckbox('Unlocked Framerate', 'If enabled, the framerate will be unlocked.', function(value:Bool):Void {
Preferences.unlockedFramerate = value;
}, Preferences.unlockedFramerate);
#else
// disabled on macos due to "error: Late swap tearing currently unsupported"
#if !mac
createPrefItemEnum('VSync', 'If enabled, game will attempt to match framerate with your monitor.', [
Expand All @@ -136,11 +141,6 @@ class PreferencesMenu extends Page<OptionsState.OptionsMenuPageName>
case WindowVSyncMode.ADAPTIVE: "Adaptive";
});
#end
#if web
createPrefItemCheckbox('Unlocked Framerate', 'If enabled, the framerate will be unlocked.', function(value:Bool):Void {
Preferences.unlockedFramerate = value;
}, Preferences.unlockedFramerate);
#else
createPrefItemNumber('FPS', 'The maximum framerate that the game targets.', function(value:Float) {
Preferences.framerate = Std.int(value);
}, null, Preferences.framerate, 30, 300, 5, 0);
Expand Down
Loading