From cfcd3842ed0b46c1eeb7d1e490a882e5d3f26441 Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Thu, 10 Dec 2015 18:44:31 +0100 Subject: IOS: Adds iPhone 6/6+ launch screens --- backends/platform/ios7/iOS7AppDelegate.mm | 6 ++--- backends/platform/ios7/ios7_video.h | 1 - backends/platform/ios7/ios7_video.mm | 7 +++--- .../LaunchImage.launchimage/Contents.json | 21 +++++++++------- .../ScummVM-splash-1242x2208.png | Bin 0 -> 1624064 bytes .../ScummVM-splash-2208x1242.png | Bin 0 -> 2234609 bytes .../ScummVM-splash-750x1334.png | Bin 0 -> 917056 bytes ports.mk | 27 +++++++++++++++++++++ 8 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png create mode 100644 dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png create mode 100644 dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png diff --git a/backends/platform/ios7/iOS7AppDelegate.mm b/backends/platform/ios7/iOS7AppDelegate.mm index 0f645e5055..d664f91ccc 100644 --- a/backends/platform/ios7/iOS7AppDelegate.mm +++ b/backends/platform/ios7/iOS7AppDelegate.mm @@ -30,7 +30,7 @@ } - (void)applicationDidFinishLaunching:(UIApplication *)application { - CGRect rect = [[UIScreen mainScreen] bounds]; + CGRect rect = [[UIScreen mainScreen] bounds]; // Create the directory for savegames #ifdef IPHONE_OFFICIAL @@ -63,11 +63,11 @@ [NSThread detachNewThreadSelector:@selector(mainLoop:) toTarget:self withObject:nil]; } -- (void)applicationDidEnterBackground:(UIApplication *)application { +- (void)applicationWillResignActive:(UIApplication *)application { [_view applicationSuspend]; } -- (void)applicationWillEnterForeground:(UIApplication *)application { +- (void)applicationDidBecomeActive:(UIApplication *)application { [_view applicationResume]; } diff --git a/backends/platform/ios7/ios7_video.h b/backends/platform/ios7/ios7_video.h index bed552c7cf..799cd21a94 100644 --- a/backends/platform/ios7/ios7_video.h +++ b/backends/platform/ios7/ios7_video.h @@ -84,7 +84,6 @@ typedef struct { GLfloat _mouseScaleX, _mouseScaleY; int _scaledShakeOffsetY; - CGFloat _contentScaleFactor; UITouch *_firstTouch; UITouch *_secondTouch; diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm index fe2285253c..300ab044a7 100644 --- a/backends/platform/ios7/ios7_video.mm +++ b/backends/platform/ios7/ios7_video.mm @@ -380,8 +380,7 @@ uint getSizeNextPOT(uint size) { g_fullWidth = (int)MAX(frame.size.width, frame.size.height); g_fullHeight = (int)MIN(frame.size.width, frame.size.height); - _contentScaleFactor = [[UIScreen mainScreen] scale]; - [self setContentScaleFactor:_contentScaleFactor]; + [self setContentScaleFactor:[[UIScreen mainScreen] scale]]; _scalerMemorySrc = NULL; _scalerMemoryDst = NULL; @@ -831,8 +830,8 @@ uint getSizeNextPOT(uint size) { - (bool)getMouseCoords:(CGPoint)point eventX:(int *)x eventY:(int *)y { // We scale the input according to our scale factor to get actual screen // coordinates. - point.x *= _contentScaleFactor; - point.y *= _contentScaleFactor; + point.x *= self.contentScaleFactor; + point.y *= self.contentScaleFactor; CGRect *area; int width, height, offsetY; diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json b/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json index 139f4e7756..40e3b1e3dd 100644 --- a/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/dists/ios7/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -1,27 +1,30 @@ { "images" : [ { - "orientation" : "portrait", - "idiom" : "iphone", "extent" : "full-screen", - "minimum-system-version" : "8.0", + "idiom" : "iphone", "subtype" : "736h", + "filename" : "ScummVM-splash-1242x2208.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", "scale" : "3x" }, { - "orientation" : "landscape", - "idiom" : "iphone", "extent" : "full-screen", - "minimum-system-version" : "8.0", + "idiom" : "iphone", "subtype" : "736h", + "filename" : "ScummVM-splash-2208x1242.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", "scale" : "3x" }, { - "orientation" : "portrait", - "idiom" : "iphone", "extent" : "full-screen", - "minimum-system-version" : "8.0", + "idiom" : "iphone", "subtype" : "667h", + "filename" : "ScummVM-splash-750x1334.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", "scale" : "2x" }, { diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png new file mode 100644 index 0000000000..c70153b1f7 Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.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 new file mode 100644 index 0000000000..33b3740092 Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png differ diff --git a/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png new file mode 100644 index 0000000000..630502974a Binary files /dev/null and b/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png differ diff --git a/ports.mk b/ports.mk index 05b492c46b..dd98657d1c 100644 --- a/ports.mk +++ b/ports.mk @@ -136,6 +136,30 @@ ios7bundle: ios7 print "\t";\ print "\t\t";\ print "\t\t\tUILaunchImageMinimumOSVersion";\ + print "\t\t\t8.0";\ + print "\t\t\tUILaunchImageName";\ + print "\t\t\tLaunchImage-800-Portrait-736h";\ + print "\t\t\tUILaunchImageOrientation";\ + print "\t\t\tPortrait";\ + print "\t\t\tUILaunchImageSize";\ + print "\t\t\t{414, 736}";\ + print "\t\t\tUILaunchImageMinimumOSVersion";\ + print "\t\t\t8.0";\ + print "\t\t\tUILaunchImageName";\ + print "\t\t\tLaunchImage-800-Landscape-736h";\ + print "\t\t\tUILaunchImageOrientation";\ + print "\t\t\tLandscape";\ + print "\t\t\tUILaunchImageSize";\ + print "\t\t\t{414, 736}";\ + print "\t\t\tUILaunchImageMinimumOSVersion";\ + print "\t\t\t8.0";\ + print "\t\t\tUILaunchImageName";\ + print "\t\t\tLaunchImage-800-667h";\ + print "\t\t\tUILaunchImageOrientation";\ + print "\t\t\tPortrait";\ + print "\t\t\tUILaunchImageSize";\ + print "\t\t\t{375, 667}";\ + print "\t\t\tUILaunchImageMinimumOSVersion";\ print "\t\t\t7.0";\ print "\t\t\tUILaunchImageName";\ print "\t\t\tLaunchImage-700-568h";\ @@ -196,6 +220,9 @@ endif cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1024x768.png $(bundle_name)/LaunchImage-700-Landscape~ipad.png cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1536x2048.png $(bundle_name)/LaunchImage-700-Portrait@2x~ipad.png cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-768x1024.png $(bundle_name)/LaunchImage-700-Portrait~ipad.png + cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-1242x2208.png $(bundle_name)/LaunchImage-800-Portrait-736h@3x.png + cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-2208x1242.png $(bundle_name)/LaunchImage-800-Landscape-736h@3x.png + cp $(srcdir)/dists/ios7/Images.xcassets/LaunchImage.launchimage/ScummVM-splash-750x1334.png $(bundle_name)/LaunchImage-800-667h@2x.png # Location of static libs for the iPhone ifneq ($(BACKEND), iphone) -- cgit v1.2.3