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

Fixes #14711.
This commit is contained in:
Ryan C. Gordon
2025-12-30 16:56:45 -05:00
parent 7d66d3271b
commit 1a27b5b838

View File

@@ -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;