Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lime/_internal/backend/html5/HTML5Window.hx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class HTML5Window
private var requestedFullscreen:Bool;
private var resizeElement:Bool;
private var scale = 1.0;
private var checkScale: Bool = false; // to cache the AllowHighDPI and DOM render check result
private var setHeight:Int;
private var setWidth:Int;
private var textInputEnabled:Bool;
Expand Down Expand Up @@ -108,6 +109,7 @@ class HTML5Window
if (Reflect.hasField(attributes, "allowHighDPI") && attributes.allowHighDPI && renderType != DOM)
{
scale = Browser.window.devicePixelRatio;
checkScale = true;
}

parent.__scale = scale;
Expand Down Expand Up @@ -1346,6 +1348,11 @@ class HTML5Window
{
if (!parent.__resizable) return;

if (checkScale) {
scale = Browser.window.devicePixelRatio;
parent.__scale = scale;
}

var elementWidth:Float;
var elementHeight:Float;

Expand Down