mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
The dummy video driver check is now covered by explicitly checking for cocoa above.
This commit is contained in:
parent
92bf608527
commit
2d10a3f2b9
@ -1184,27 +1184,25 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen)
|
|||||||
if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)
|
if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!_this->is_dummy) {
|
/* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */
|
||||||
/* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */
|
if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
|
||||||
if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
|
if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
|
||||||
if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
|
return -1;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
} else if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)) {
|
|
||||||
display = SDL_GetDisplayForWindow(window);
|
|
||||||
SDL_SetDisplayModeForDisplay(display, NULL);
|
|
||||||
if (_this->SetWindowFullscreen) {
|
|
||||||
_this->SetWindowFullscreen(_this, window, display, SDL_FALSE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)) {
|
||||||
|
display = SDL_GetDisplayForWindow(window);
|
||||||
|
SDL_SetDisplayModeForDisplay(display, NULL);
|
||||||
|
if (_this->SetWindowFullscreen) {
|
||||||
|
_this->SetWindowFullscreen(_this, window, display, SDL_FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) {
|
if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) {
|
||||||
if (Cocoa_IsWindowInFullscreenSpace(window) != fullscreen) {
|
if (Cocoa_IsWindowInFullscreenSpace(window) != fullscreen) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
window->last_fullscreen_flags = window->flags;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
window->last_fullscreen_flags = window->flags;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
|
#elif __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
|
||||||
|
Loading…
Reference in New Issue
Block a user