From 9b5811592d6f2764a1ddd111f301aa2fe043587d Mon Sep 17 00:00:00 2001
From: Alex Szpakowski <slime73@gmail.com>
Date: Sun, 26 May 2019 18:53:36 -0300
Subject: [PATCH] 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.

---
 src/video/uikit/SDL_uikitopengles.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index ef6275ff7..68d8f1d56 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);
         }
     }
 }