Explorar o código

Only restore desktop mode when hiding a window if that window was fullscreen

Sam Lantinga %!s(int64=2) %!d(string=hai) anos
pai
achega
fcc9deb365
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/video/SDL_video.c

+ 3 - 1
src/video/SDL_video.c

@@ -2549,7 +2549,9 @@ int SDL_HideWindow(SDL_Window *window)
     }
 
     window->is_hiding = SDL_TRUE;
-    SDL_UpdateFullscreenMode(window, SDL_FALSE);
+    if (window->flags & SDL_WINDOW_FULLSCREEN) {
+        SDL_UpdateFullscreenMode(window, SDL_FALSE);
+    }
 
     if (_this->HideWindow) {
         _this->HideWindow(_this, window);