Skip to content

Commit

Permalink
show settings at activation if emulator is not running
Browse files Browse the repository at this point in the history
  • Loading branch information
zydeco committed Jun 5, 2022
1 parent 566a142 commit 74254b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BasiliskII/src/iOS/BasiliskII/B2AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// populate documents directory so it shows up in Files
[[NSFileManager defaultManager] createDirectoryAtPath:self.userKeyboardLayoutsPath withIntermediateDirectories:YES attributes:nil error:nil];

// show preferences
[self.window.rootViewController performSelector:@selector(showSettings:) withObject:self afterDelay:0.0];

return YES;
}

Expand All @@ -111,6 +108,11 @@ - (void)applicationWillEnterForeground:(UIApplication *)application {

- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.

// Show settings if emulator is not running
if (self.emulatorRunning == NO && self.window.rootViewController.presentedViewController == nil) {
[self.window.rootViewController performSelector:@selector(showSettings:) withObject:self afterDelay:0.0];
}
}

- (void)applicationWillTerminate:(UIApplication *)application {
Expand Down

0 comments on commit 74254b5

Please sign in to comment.