diff options
author | Vincent Bénony | 2017-09-27 19:06:42 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-09-30 11:16:42 +0200 |
commit | 8bc745fb55c55623d8ada90198db8cdc8b6be8e0 (patch) | |
tree | 302e12919c4dcaa21ad65e5be78c33c2b10072e8 /backends/platform/ios7/ios7_app_delegate.mm | |
parent | be37a62591af98c379fd5f92fcab31b70a65ac6d (diff) | |
download | scummvm-rg350-8bc745fb55c55623d8ada90198db8cdc8b6be8e0.tar.gz scummvm-rg350-8bc745fb55c55623d8ada90198db8cdc8b6be8e0.tar.bz2 scummvm-rg350-8bc745fb55c55623d8ada90198db8cdc8b6be8e0.zip |
IOS: Improve iOS 11 compatibility
Diffstat (limited to 'backends/platform/ios7/ios7_app_delegate.mm')
-rw-r--r-- | backends/platform/ios7/ios7_app_delegate.mm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/backends/platform/ios7/ios7_app_delegate.mm b/backends/platform/ios7/ios7_app_delegate.mm index 88d0a8925e..014275d116 100644 --- a/backends/platform/ios7/ios7_app_delegate.mm +++ b/backends/platform/ios7/ios7_app_delegate.mm @@ -39,14 +39,6 @@ return self; } -- (void)mainLoop:(id)param { - @autoreleasepool { - iOS7_main(iOS7_argc, iOS7_argv); - } - - exit(0); -} - - (void)applicationDidFinishLaunching:(UIApplication *)application { CGRect rect = [[UIScreen mainScreen] bounds]; @@ -78,7 +70,12 @@ name:@"UIDeviceOrientationDidChangeNotification" object:nil]; - [NSThread detachNewThreadSelector:@selector(mainLoop:) toTarget:self withObject:nil]; + // Force creation of the shared instance on the main thread + iOS7_buildSharedOSystemInstance(); + + dispatch_async(dispatch_get_global_queue(0, 0), ^{ + iOS7_main(iOS7_argc, iOS7_argv); + }); } - (void)applicationWillResignActive:(UIApplication *)application { |