Răsfoiți Sursa

Get the full display bounds if the window doesn't fit in the usable bounds.

Sam Lantinga 11 luni în urmă
părinte
comite
683991ab71
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/video/SDL_video.c

+ 1 - 1
src/video/SDL_video.c

@@ -2335,7 +2335,7 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
         SDL_GetDisplayUsableBounds(displayID, &bounds);
         SDL_GetDisplayUsableBounds(displayID, &bounds);
         if (w > bounds.w || h > bounds.h) {
         if (w > bounds.w || h > bounds.h) {
             // This window is larger than the usable bounds, just center on the display
             // This window is larger than the usable bounds, just center on the display
-            SDL_GetDisplayUsableBounds(displayID, &bounds);
+            SDL_GetDisplayBounds(displayID, &bounds);
         }
         }
         if (SDL_WINDOWPOS_ISCENTERED(x) || SDL_WINDOWPOS_ISUNDEFINED(x)) {
         if (SDL_WINDOWPOS_ISCENTERED(x) || SDL_WINDOWPOS_ISUNDEFINED(x)) {
             if (SDL_WINDOWPOS_ISUNDEFINED(x)) {
             if (SDL_WINDOWPOS_ISUNDEFINED(x)) {