fix zoom shit again

This commit is contained in:
RandomityGuy 2021-07-16 22:34:14 +05:30
parent 26c9cf49fb
commit 2383e72115
2 changed files with 7 additions and 0 deletions

View file

@ -26,6 +26,10 @@ class Main extends hxd.App {
#if hl
hl.UI.closeConsole();
#end
#if js
var zoomRatio = js.Browser.window.devicePixelRatio;
s2d.scaleMode = Zoom(zoomRatio);
#end
ResourceLoader.init(s2d, () -> {
Settings.init();
AudioManager.init();

View file

@ -193,6 +193,9 @@ class Settings {
Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight);
Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed;
#end
#if js
Window.getInstance().propagateKeyEvents = true;
#end
// @:privateAccess Window.getInstance().window.center();
Window.getInstance().addResizeEvent(() -> {
var wnd = Window.getInstance();