summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/dist/html/full-size.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index 44b009524c..0e8a41a9fc 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -162,8 +162,13 @@ $GODOT_HEAD_INCLUDE
requestAnimationFrame(animate);
function adjustCanvasDimensions() {
- canvas.width = innerWidth;
- canvas.height = innerHeight;
+ var scale = window.devicePixelRatio || 1;
+ var width = window.innerWidth;
+ var height = window.innerHeight;
+ canvas.width = width * scale;
+ canvas.height = height * scale;
+ canvas.style.width = width + "px";
+ canvas.style.height = height + "px";
}
animationCallbacks.push(adjustCanvasDimensions);
adjustCanvasDimensions();