From b31df0108ab4026da3b899b96fdf04d07e7353d0 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Thu, 26 Jan 2017 16:23:01 -0800 Subject: [PATCH] Go back to previous calculation --- lime/system/System.hx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lime/system/System.hx b/lime/system/System.hx index 11957576a..c0f2eda2e 100644 --- a/lime/system/System.hx +++ b/lime/system/System.hx @@ -142,12 +142,13 @@ class System { display.dpi = Capabilities.screenDPI; display.currentMode = new DisplayMode (Std.int (Capabilities.screenResolutionX), Std.int (Capabilities.screenResolutionY), 60, ARGB32); #elseif (js && html5) - var div = Browser.document.createElement ("div"); - div.style.width = "1in"; - Browser.document.body.appendChild (div); - var ppi = Browser.document.defaultView.getComputedStyle (div, null).getPropertyValue ("width"); - Browser.document.body.removeChild (div); - display.dpi = Std.parseFloat (ppi); + //var div = Browser.document.createElement ("div"); + //div.style.width = "1in"; + //Browser.document.body.appendChild (div); + //var ppi = Browser.document.defaultView.getComputedStyle (div, null).getPropertyValue ("width"); + //Browser.document.body.removeChild (div); + //display.dpi = Std.parseFloat (ppi); + display.dpi = 96 * Browser.window.devicePixelRatio; display.currentMode = new DisplayMode (Browser.window.screen.width, Browser.window.screen.height, 60, ARGB32); #end