fix again

This commit is contained in:
RandomityGuy 2024-06-24 23:44:57 +05:30
parent 424127e527
commit a33fb533df
2 changed files with 6 additions and 2 deletions

View file

@ -47,8 +47,10 @@ class Main extends hxd.App {
#end
#if js
var zoomRatio = (Util.isTouchDevice() && !Util.isTablet()) ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 768 : js.Browser.window.devicePixelRatio; // js.Browser.window.devicePixelRatio;
if (Util.isIPhone() && js.Browser.window.devicePixelRatio > 2.001)
if (Util.isIPhone())
zoomRatio = 2;
if (Util.isIPhone() && js.Browser.window.devicePixelRatio == 2)
zoomRatio = 1.0;
s2d.scaleMode = Zoom(zoomRatio);
Settings.zoomRatio = zoomRatio;
Settings.optionsSettings.screenWidth = cast Math.max(js.Browser.window.screen.width,

View file

@ -453,8 +453,10 @@ class Settings {
var zoomRatio = Window.getInstance().windowToPixelRatio;
#if js
var zoomRatio = (Util.isTouchDevice() && !Util.isTablet()) ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 768 : js.Browser.window.devicePixelRatio; // 768 / js.Browser.window.innerHeight; // js.Browser.window.innerHeight * js.Browser.window.devicePixelRatio / 768;
if (Util.isIPhone() && js.Browser.window.devicePixelRatio > 2.001)
if (Util.isIPhone())
zoomRatio = 2;
if (Util.isIPhone() && js.Browser.window.devicePixelRatio == 2)
zoomRatio = 1.0;
Settings.zoomRatio = zoomRatio;
#end
#if android