diff --git a/src/Settings.hx b/src/Settings.hx index d484a367..69b7c815 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -229,7 +229,9 @@ class Settings { Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed; #end AudioManager.updateVolumes(); + #if hl Window.getInstance().vsync = optionsSettings.vsync; + #end @:privateAccess cast(MarbleGame.instance.scene.renderer, Renderer).onResize(); MarbleGame.canvas.render(MarbleGame.canvas.scene2d); diff --git a/src/gui/VideoOptionsGui.hx b/src/gui/VideoOptionsGui.hx index e78f72c7..2667c377 100644 --- a/src/gui/VideoOptionsGui.hx +++ b/src/gui/VideoOptionsGui.hx @@ -110,11 +110,13 @@ class VideoOptionsGui extends GuiImage { }, 0.35); displayOpt.setCurrentOption(Settings.optionsSettings.isFullScreen ? 0 : 1); + #if hl var vsyncOpt = optionCollection.addOption(1, "VSync", ["Disabled", "Enabled"], (idx) -> { Settings.optionsSettings.vsync = (idx == 1); return true; }, 0.35); vsyncOpt.setCurrentOption(Settings.optionsSettings.vsync ? 1 : 0); + #end function numberRange(start:Int, stop:Int, step:Int) { var range = [];