mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix vsync on js...again
This commit is contained in:
parent
f7be905972
commit
868cf71120
2 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue