Folded SDL_WINDOW_FULLSCREEN_EXCLUSIVE and SDL_WINDOW_FULLSCREEN_DESKTOP into a single SDL_WINDOW_FULLSCREEN flag

The fullscreen video mode used by the window can be used to determine whether it's in exclusive fullscreen or fullscreen desktop mode.
This commit is contained in:
Sam Lantinga
2023-02-01 11:30:28 -08:00
parent 14338ab459
commit ac75fe9324
36 changed files with 184 additions and 250 deletions

View File

@@ -840,7 +840,7 @@ static EM_BOOL Emscripten_HandleFullscreenChange(int eventType, const Emscripten
window_data->fullscreen_mode_flags = 0;
} else {
window_data->window->flags &= ~SDL_WINDOW_FULLSCREEN_MASK;
window_data->window->flags &= ~SDL_WINDOW_FULLSCREEN;
/* reset fullscreen window if the browser left fullscreen */
display = SDL_GetVideoDisplayForWindow(window_data->window);
@@ -866,7 +866,7 @@ static EM_BOOL Emscripten_HandleResize(int eventType, const EmscriptenUiEvent *u
}
}
if ((window_data->window->flags & SDL_WINDOW_FULLSCREEN_MASK) == 0) {
if ((window_data->window->flags & SDL_WINDOW_FULLSCREEN) == 0) {
/* this will only work if the canvas size is set through css */
if (window_data->window->flags & SDL_WINDOW_RESIZABLE) {
double w = window_data->window->w;