Emscripten_SetWindowFullscreen: Fix crash due to uninitialized EmscriptenFullscreenStrategy members

(cherry picked from commit 7b74e2eeb8)
This commit is contained in:
pastdue
2024-02-06 17:59:51 -05:00
committed by Sam Lantinga
parent a09b0b05eb
commit d2a3347c19

View File

@@ -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) {