Commit 9b5811592d6f2764a1ddd111f301aa2fe043587d

Alex Szpakowski 2019-05-26T18:53:36

iOS: return SDL_GetWindowSize from SDL_GL_GetDrawableSize if there's no GLES view in the window (matches the behaviour of SDL_GL_GetDrawableSize on other platforms). Addresses bug #4629.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index ef6275f..68d8f1d 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -96,6 +96,8 @@ UIKit_GL_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
             if (h) {
                 *h = glview.backingHeight;
             }
+        } else {
+            SDL_GetWindowSize(window, w, h);
         }
     }
 }