mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
Emscripten_SetWindowFullscreen: Fix crash due to uninitialized EmscriptenFullscreenStrategy members
(cherry picked from commit 7b74e2eeb8
)
This commit is contained in:
@@ -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;
|
SDL_bool is_desktop_fullscreen = (window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
SDL_zero(strategy);
|
||||||
strategy.scaleMode = is_desktop_fullscreen ? EMSCRIPTEN_FULLSCREEN_SCALE_STRETCH : EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT;
|
strategy.scaleMode = is_desktop_fullscreen ? EMSCRIPTEN_FULLSCREEN_SCALE_STRETCH : EMSCRIPTEN_FULLSCREEN_SCALE_ASPECT;
|
||||||
|
|
||||||
if (!is_desktop_fullscreen) {
|
if (!is_desktop_fullscreen) {
|
||||||
|
Reference in New Issue
Block a user