summaryrefslogtreecommitdiff
path: root/misc/dist/html/full-size.html
diff options
context:
space:
mode:
Diffstat (limited to 'misc/dist/html/full-size.html')
-rw-r--r--misc/dist/html/full-size.html18
1 files changed, 12 insertions, 6 deletions
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index 44b009524c..9269227d02 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -142,6 +142,7 @@ $GODOT_HEAD_INCLUDE
(function() {
+ const EXECUTABLE_NAME = '$GODOT_BASENAME';
const MAIN_PACK = '$GODOT_BASENAME.pck';
const INDETERMINATE_STATUS_STEP_MS = 100;
@@ -162,8 +163,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();
@@ -175,9 +181,9 @@ $GODOT_HEAD_INCLUDE
[statusProgress, statusIndeterminate, statusNotice].forEach(elem => {
elem.style.display = 'none';
});
- if (animateStatusIndeterminate in animationCallbacks) {
- animationCallbacks.erase(animateStatusIndeterminate);
- }
+ animationCallbacks = animationCallbacks.filter(function(value) {
+ return (value != animateStatusIndeterminate);
+ });
switch (mode) {
case 'progress':
statusProgress.style.display = 'block';
@@ -249,7 +255,7 @@ $GODOT_HEAD_INCLUDE
} else {
setStatusMode('indeterminate');
engine.setCanvas(canvas);
- engine.startGame(MAIN_PACK).then(() => {
+ engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
setStatusMode('hidden');
initializing = false;
}, displayFailureNotice);