SDL: emscripten: set `window->w` and `->h` when creating with external css sizing.

From 1a27b5b838f33ca437b9c2fbb97bc5b9096b158b Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 30 Dec 2025 16:56:45 -0500
Subject: [PATCH] emscripten: set `window->w` and `->h` when creating with
 external css sizing.

Fixes #14711.
---
 src/video/emscripten/SDL_emscriptenvideo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/emscripten/SDL_emscriptenvideo.c b/src/video/emscripten/SDL_emscriptenvideo.c
index 2109d94e88b04..6c1034f39832b 100644
--- a/src/video/emscripten/SDL_emscriptenvideo.c
+++ b/src/video/emscripten/SDL_emscriptenvideo.c
@@ -604,6 +604,8 @@ static bool Emscripten_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window,
     wdata->external_size = SDL_floor(css_w) != 1 || SDL_floor(css_h) != 1;
     if (wdata->external_size) {
         fill_document = false;  // can't be resizable if something else is controlling it.
+        window->w = (int) css_w;
+        window->h = (int) css_h;
     }
 
     wdata->window = window;