Răsfoiți Sursa

video: Preserve the flag to restore popup windows with the parent when recreating the window during renderer initialization

Frank Praznik 2 ani în urmă
părinte
comite
969e0842e6
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      src/video/SDL_video.c

+ 2 - 0
src/video/SDL_video.c

@@ -2077,7 +2077,9 @@ int SDL_RecreateWindow(SDL_Window *window, Uint32 flags)
 
     /* Restore video mode, etc. */
     if (!(window->flags & SDL_WINDOW_FOREIGN)) {
+        const SDL_bool restore_on_show = window->restore_on_show;
         SDL_HideWindow(window);
+        window->restore_on_show = restore_on_show;
     }
 
     /* Tear down the old native window */