Navigation Menu

Skip to content

Commit

Permalink
The dummy video driver check is now covered by explicitly checking fo…
Browse files Browse the repository at this point in the history
…r cocoa above.
  • Loading branch information
slouken committed Aug 30, 2017
1 parent 92bf608 commit 2d10a3f
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions src/video/SDL_video.c
Expand Up @@ -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)
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 (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
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);
}
/* 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 (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
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);
}
}

if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) {
if (Cocoa_IsWindowInFullscreenSpace(window) != fullscreen) {
return -1;
}
window->last_fullscreen_flags = window->flags;
return 0;
if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) {
if (Cocoa_IsWindowInFullscreenSpace(window) != fullscreen) {
return -1;
}
window->last_fullscreen_flags = window->flags;
return 0;
}
}
#elif __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
Expand Down

0 comments on commit 2d10a3f

Please sign in to comment.