Просмотр исходного кода

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

Fixes #14711.
Ryan C. Gordon 2 месяцев назад
Родитель
Сommit
1a27b5b838
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/video/emscripten/SDL_emscriptenvideo.c

+ 2 - 0
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;