diff options
author | Vincent Bénony | 2015-12-03 12:34:01 +0100 |
---|---|---|
committer | Vincent Bénony | 2016-01-06 16:17:31 +0100 |
commit | e9934b8cc446b42c2b701a2971bdcc1b5047164f (patch) | |
tree | df6331869f005fb047ab45f266c2d81ad312e03d /backends/platform/iphone | |
parent | c1e664b6d681e4f59de361457e7487c138aaf31f (diff) | |
download | scummvm-rg350-e9934b8cc446b42c2b701a2971bdcc1b5047164f.tar.gz scummvm-rg350-e9934b8cc446b42c2b701a2971bdcc1b5047164f.tar.bz2 scummvm-rg350-e9934b8cc446b42c2b701a2971bdcc1b5047164f.zip |
IOS: Fixes a crash on startup on iOS 7
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r-- | backends/platform/iphone/iphone_video.mm | 11 |
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) { |