diff --git a/src/Main.hx b/src/Main.hx index b448b623..5fee9e17 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -51,6 +51,12 @@ class Main extends hxd.App { #if js var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 768 : js.Browser.window.devicePixelRatio; // js.Browser.window.devicePixelRatio; s2d.scaleMode = Zoom(zoomRatio); + Settings.zoomRatio = zoomRatio; + Settings.optionsSettings.screenWidth = cast js.Browser.window.screen.width; // 1024; // cast(js.Browser.window.innerWidth / js.Browser.window.innerHeight) * 768; // cast js.Browser.window.innerWidth * js.Browser.window.devicePixelRatio * 0.5; + Settings.optionsSettings.screenHeight = cast js.Browser.window.screen.height; // 768; // cast js.Browser.window.innerHeight * js.Browser.window.devicePixelRatio * 0.5; + var canvasElement = js.Browser.document.getElementById("webgl"); + canvasElement.style.width = "100%"; + canvasElement.style.height = "100%"; #end #if android var zoomRatio = Window.getInstance().height / 600;