Browse Source

[HTML5] Properly set canvas size during setup.

It used to be updated before the first iteration, causing the
window/viewport size values to be incorrect during the initialization
phase (e.g. during the first `_ready` notification).

(cherry picked from commit 3f059b90d61d946b6f5d606c8a306ec71ea305b9)
Fabio Alessandrelli 4 years ago
parent
commit
82b900bdda
1 changed files with 1 additions and 0 deletions
  1. 1 0
      platform/javascript/js/libs/library_godot_display.js

+ 1 - 0
platform/javascript/js/libs/library_godot_display.js

@@ -908,6 +908,7 @@ const GodotDisplay = {
 			canvas.style.left = 0;
 			break;
 		}
+		GodotDisplayScreen.updateSize();
 		if (p_fullscreen) {
 			GodotDisplayScreen.requestFullscreen();
 		}