Emscripten_SetWindowFullscreen: Fix crash due to uninitialized EmscriptenFullscreenStrategy members

(cherry picked from commit 7b74e2eeb8)
This commit is contained in:
pastdue authored and Sam Lantinga committed 2024-02-06 16:27:18 -08:00
1 parent a09b0b05eb
commit d2a3347c19
1 file changed
+1
@@ -342,6 +342,7 @@ static void Emscripten_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoD
SDL_bool is_desktop_fullscreen = (window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP;
int res;
SDL_zero(strategy);
strategy.scaleMode = is_desktop_fullscreen ? EMSCRIPTEN_FULLSCREEN_SCALE_STRETCH : EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT;
if (!is_desktop_fullscreen) {