[Scummvm-git-logs] scummvm master -> b4bad9100a07266b38a0adaa2efa597b362f027f

criezy criezy at scummvm.org
Sun Oct 28 18:16:21 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b4bad9100a IOS: Support building in Xcode 10/iOS 12, and for iPhone X-like devices that have a "safe area"


Commit: b4bad9100a07266b38a0adaa2efa597b362f027f
    https://github.com/scummvm/scummvm/commit/b4bad9100a07266b38a0adaa2efa597b362f027f
Author: Yoshi Sugawara (yoshi.sugawara at gmail.com)
Date: 2018-10-28T17:16:06Z

Commit Message:
IOS: Support building in Xcode 10/iOS 12, and for iPhone X-like devices that have a "safe area"

iOS 12 drops support for libstdc++, so the project needs to be compiled explicitly using libc++.
Support the "safe area" when redrawing the view to leave space for the notch in portrait and
landscape orientations.

Changed paths:
  A dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1125x2436.png
  A dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2688.png
  A dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1792x828.png
  A dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2436x1125.png
  A dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2688x1242.png
  A dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-828x1792.png
    backends/platform/ios7/ios7_video.mm
    devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
    dists/ios7/Images.xcassets/AppIcon.appiconset/Contents.json
    dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json
    dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png
    dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png
    dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2048x1536.png
    dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png
    dists/ios7/Info.plist


diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index 7ce19f1..35df78e 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -776,6 +776,7 @@ uint getSizeNextPOT(uint size) {
 		GLfloat ratio = adjustedHeight / adjustedWidth;
 		int height = (int)(screenWidth * ratio);
 		//printf("Making rect (%u, %u)\n", screenWidth, height);
+        
 		_gameScreenRect = CGRectMake(0, 0, screenWidth, height);
 
 		overlayPortraitRatio = (_videoContext.overlayHeight * ratio) / _videoContext.overlayWidth;
@@ -792,6 +793,32 @@ uint getSizeNextPOT(uint size) {
 
 	[self setViewTransformation];
 	[self updateMouseCursorScaling];
+    [self adjustViewFrameForSafeArea];
+}
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
+-(void)adjustViewFrameForSafeArea {
+#if __has_builtin(__builtin_available)
+    if ( @available(iOS 11,*) ) {
+#else
+    if ( [[UIApplication sharedApplication] keyWindow] respondsToSelector:@selector(safeAreaInsets) ) {
+#endif
+        CGRect screenSize = [[UIScreen mainScreen] bounds];
+        UIEdgeInsets inset = [[UIApplication sharedApplication] keyWindow].safeAreaInsets;
+        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
+        CGRect newFrame = screenSize;
+        if ( orientation == UIInterfaceOrientationPortrait ) {
+            newFrame = CGRectMake(screenSize.origin.x, screenSize.origin.y + inset.top, screenSize.size.width, screenSize.size.height - inset.top);
+        } else if ( orientation == UIInterfaceOrientationLandscapeLeft ) {
+            newFrame = CGRectMake(screenSize.origin.x, screenSize.origin.y, screenSize.size.width - inset.right, screenSize.size.height);
+        } else if ( orientation == UIInterfaceOrientationLandscapeRight ) {
+            newFrame = CGRectMake(screenSize.origin.x + inset.left, screenSize.origin.y, screenSize.size.width - inset.left, screenSize.size.height);
+        }
+        self.frame = newFrame;
+    }
 }
 
 - (void)setViewTransformation {
diff --git a/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj b/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
index 55266a8..9a75f2f 100644
--- a/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
+++ b/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
@@ -186,6 +186,7 @@
 		F9A66C2E1396D36100CEE494 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_CXX_LIBRARY = "libc++";
 				ENABLE_TESTABILITY = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_OPTIMIZATION_LEVEL = 0;
@@ -199,6 +200,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.5;
 				ONLY_ACTIVE_ARCH = YES;
+				OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
 				SDKROOT = macosx;
 			};
 			name = Debug;
@@ -206,6 +208,7 @@
 		F9A66C2F1396D36100CEE494 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_CXX_LIBRARY = "libc++";
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					POSIX,
@@ -215,6 +218,7 @@
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.5;
+				OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
 				SDKROOT = macosx;
 			};
 			name = Release;
@@ -230,6 +234,7 @@
 					"$(inherited)",
 					DEBUG,
 				);
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Debug;
@@ -242,6 +247,7 @@
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Release;
diff --git a/dists/ios7/Images.xcassets/AppIcon.appiconset/Contents.json b/dists/ios7/Images.xcassets/AppIcon.appiconset/Contents.json
index c37df59..fe7b33c 100644
--- a/dists/ios7/Images.xcassets/AppIcon.appiconset/Contents.json
+++ b/dists/ios7/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -1,6 +1,16 @@
 {
   "images" : [
     {
+      "idiom" : "iphone",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "20x20",
+      "scale" : "3x"
+    },
+    {
       "size" : "29x29",
       "idiom" : "iphone",
       "filename" : "icon4-29 at 2x.png",
@@ -37,6 +47,16 @@
       "scale" : "3x"
     },
     {
+      "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
       "size" : "29x29",
       "idiom" : "ipad",
       "filename" : "icon4-29.png",
@@ -77,6 +97,11 @@
       "idiom" : "ipad",
       "filename" : "icon4-83.5 at 2x.png",
       "scale" : "2x"
+    },
+    {
+      "idiom" : "ios-marketing",
+      "size" : "1024x1024",
+      "scale" : "1x"
     }
   ],
   "info" : {
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json b/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json
index 40e3b1e..2f76c4e 100644
--- a/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json
+++ b/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -3,6 +3,60 @@
     {
       "extent" : "full-screen",
       "idiom" : "iphone",
+      "subtype" : "2688h",
+      "filename" : "ScummVM-splash-1242x2688.png",
+      "minimum-system-version" : "12.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "2688h",
+      "filename" : "ScummVM-splash-2688x1242.png",
+      "minimum-system-version" : "12.0",
+      "orientation" : "landscape",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "1792h",
+      "filename" : "ScummVM-splash-828x1792.png",
+      "minimum-system-version" : "12.0",
+      "orientation" : "portrait",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "1792h",
+      "filename" : "ScummVM-splash-1792x828.png",
+      "minimum-system-version" : "12.0",
+      "orientation" : "landscape",
+      "scale" : "2x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "2436h",
+      "filename" : "ScummVM-splash-1125x2436.png",
+      "minimum-system-version" : "11.0",
+      "orientation" : "portrait",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
+      "subtype" : "2436h",
+      "filename" : "ScummVM-splash-2436x1125.png",
+      "minimum-system-version" : "11.0",
+      "orientation" : "landscape",
+      "scale" : "3x"
+    },
+    {
+      "extent" : "full-screen",
+      "idiom" : "iphone",
       "subtype" : "736h",
       "filename" : "ScummVM-splash-1242x2208.png",
       "minimum-system-version" : "8.0",
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1125x2436.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1125x2436.png
new file mode 100644
index 0000000..05c8f87
Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1125x2436.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png
index f88f48d..fb5c2e1 100644
Binary files a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2688.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2688.png
new file mode 100644
index 0000000..82ddb62
Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2688.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png
index ca9a2c1..a71c06d 100644
Binary files a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1792x828.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1792x828.png
new file mode 100644
index 0000000..fcdb1e4
Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1792x828.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2048x1536.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2048x1536.png
index 85e661a..1439b15 100644
Binary files a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2048x1536.png and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2048x1536.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png
index e013a1e..4be9066 100644
Binary files a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2436x1125.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2436x1125.png
new file mode 100644
index 0000000..2673af2
Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2436x1125.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2688x1242.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2688x1242.png
new file mode 100644
index 0000000..c6f086b
Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2688x1242.png differ
diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-828x1792.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-828x1792.png
new file mode 100644
index 0000000..9282deb
Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-828x1792.png differ
diff --git a/dists/ios7/Info.plist b/dists/ios7/Info.plist
index 617c499..ab408fd 100644
--- a/dists/ios7/Info.plist
+++ b/dists/ios7/Info.plist
@@ -24,6 +24,8 @@
 	<string>????</string>
 	<key>CFBundleVersion</key>
 	<string>2.1.0git</string>
+	<key>LSSupportsOpeningDocumentsInPlace</key>
+	<true/>
 	<key>UIApplicationExitsOnSuspend</key>
 	<false/>
 	<key>UIDeviceFamily</key>





More information about the Scummvm-git-logs mailing list