aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r--backends/platform/iphone/iphone_video.mm11
1 files changed, 10 insertions, 1 deletions
diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm
index 69d5b18d5f..efd8ea3acf 100644
--- a/backends/platform/iphone/iphone_video.mm
+++ b/backends/platform/iphone/iphone_video.mm
@@ -202,7 +202,16 @@ const char *iPhone_getDocumentsDir() {
return 1;
}
- CGSize screenSize = [[UIScreen mainScreen] nativeBounds].size;
+ CGSize screenSize;
+ UIScreen *mainScreen = [UIScreen mainScreen];
+ if ([mainScreen respondsToSelector:@selector(nativeBounds)]) {
+ screenSize = [mainScreen nativeBounds].size;
+ }
+ else {
+ screenSize = [mainScreen bounds].size;
+ screenSize.width *= screenScale;
+ screenSize.height *= screenScale;
+ }
CGFloat mxSize = MAX(screenSize.width, screenSize.height);
if (mxSize <= 1136) {