mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-26 18:02:39 +00:00
fix resolution in js
This commit is contained in:
parent
f53ea53697
commit
7076ccdff3
2 changed files with 2 additions and 2 deletions
|
|
@ -39,7 +39,7 @@ class Main extends hxd.App {
|
|||
hl.UI.closeConsole();
|
||||
#end
|
||||
#if js
|
||||
var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 600 : js.Browser.window.devicePixelRatio; // js.Browser.window.devicePixelRatio;
|
||||
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);
|
||||
#end
|
||||
#if android
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ class Settings {
|
|||
var wnd = Window.getInstance();
|
||||
var zoomRatio = Window.getInstance().windowToPixelRatio;
|
||||
#if js
|
||||
var zoomRatio = Util.isTouchDevice() ? js.Browser.window.screen.height * js.Browser.window.devicePixelRatio / 600 : js.Browser.window.devicePixelRatio; // 768 / js.Browser.window.innerHeight; // js.Browser.window.innerHeight * js.Browser.window.devicePixelRatio / 768;
|
||||
var zoomRatio = Util.isTouchDevice() ? 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;
|
||||
Settings.zoomRatio = zoomRatio;
|
||||
#end
|
||||
#if android
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue