Completely removed custom splash screen code. iOS 8 introduced yet another official way to do launch images (via a Storyboard), and the custom splash screen code was broken on newer devices and caused bugs for all devices anyway.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index c4a1999..fe308b2 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -39,7 +39,6 @@
static int forward_argc;
static char **forward_argv;
static int exit_status;
-static UIWindow *launch_window;
int main(int argc, char **argv)
{
@@ -75,86 +74,6 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa
[UIApplication sharedApplication].idleTimerDisabled = disable;
}
-@interface SDL_splashviewcontroller : UIViewController
-
-- (void)updateSplashImage:(UIInterfaceOrientation)interfaceOrientation;
-
-@end
-
-@implementation SDL_splashviewcontroller {
- UIImageView *splash;
- UIImage *splashPortrait;
- UIImage *splashLandscape;
-}
-
-- (id)init
-{
- self = [super init];
- if (self == nil) {
- return nil;
- }
-
- splash = [[UIImageView alloc] init];
- self.view = splash;
-
- CGSize size = [UIScreen mainScreen].bounds.size;
- float height = SDL_max(size.width, size.height);
- splashPortrait = [UIImage imageNamed:[NSString stringWithFormat:@"Default-%dh.png", (int)height]];
- if (!splashPortrait) {
- splashPortrait = [UIImage imageNamed:@"Default.png"];
- }
- splashLandscape = [UIImage imageNamed:@"Default-Landscape.png"];
- if (!splashLandscape && splashPortrait) {
- splashLandscape = [[UIImage alloc] initWithCGImage: splashPortrait.CGImage
- scale: 1.0
- orientation: UIImageOrientationRight];
- }
-
- [self updateSplashImage:[[UIApplication sharedApplication] statusBarOrientation]];
-
- return self;
-}
-
-- (NSUInteger)supportedInterfaceOrientations
-{
- NSUInteger orientationMask = UIInterfaceOrientationMaskAll;
-
- /* Don't allow upside-down orientation on the phone, so answering calls is in the natural orientation */
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
- orientationMask &= ~UIInterfaceOrientationMaskPortraitUpsideDown;
- }
- return orientationMask;
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient
-{
- NSUInteger orientationMask = [self supportedInterfaceOrientations];
- return (orientationMask & (1 << orient));
-}
-
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
-{
- [self updateSplashImage:interfaceOrientation];
-}
-
-- (void)updateSplashImage:(UIInterfaceOrientation)interfaceOrientation
-{
- UIImage *image;
-
- if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) {
- image = splashLandscape;
- } else {
- image = splashPortrait;
- }
-
- if (image) {
- splash.image = image;
- }
-}
-
-@end
-
-
@implementation SDLUIKitDelegate
/* convenience method */
@@ -184,11 +103,6 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa
exit_status = SDL_main(forward_argc, forward_argv);
SDL_iPhoneSetEventPump(SDL_FALSE);
- /* If we showed a splash image, clean it up */
- if (launch_window) {
- launch_window = nil;
- }
-
/* exit, passing the return status from the user's application */
/* We don't actually exit to support applications that do setup in
* their main function and then allow the Cocoa event loop to run.
@@ -198,20 +112,6 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- /* Keep the launch image up until we set a video mode */
-
- /* This is disabled temporarily because the splash viewcontroller is
- * interfering with rotation once a regular window is created: the view's
- * orientations are incorrect and the status bar rotates without the view.
- * Additionally, the splash viewcontroller doesn't load the correct launch
- * images on iOS 7 and modern devices. */
- /*launch_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
-
- UIViewController *splashViewController = [[SDL_splashviewcontroller alloc] init];
- launch_window.rootViewController = splashViewController;
- [launch_window addSubview:splashViewController.view];
- [launch_window makeKeyAndVisible];*/
-
/* Set working directory to resource path */
[[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];