Skip to content
Permalink
Browse files

fixes 'ROM not found' alert not appearing due to fix for issue 31

  • Loading branch information...
panicsteve committed Apr 18, 2019
1 parent 915ff47 commit 14e70e52c498fcebce06a7f5c1f1c8d532c606b4
Showing with 16 additions and 8 deletions.
  1. +16 −8 app/iEinstein/Classes/iEinsteinViewController.mm
@@ -41,14 +41,15 @@ @implementation iEinsteinViewController

- (void)viewWillAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[super viewWillAppear:animated];
#ifdef USE_STORYBOARDS
[self initEmulator];
#endif
}

- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}


@@ -76,12 +77,15 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger
case 2:
switch (buttonIndex) {
case 0: break;
case 1: [self stopEmulator]; break;
case 1: [self stopEmulator]; break;
default: break;
}
break;
case 3:
[[UIApplication sharedApplication] performSelector:@selector(terminateWithSuccess)];
break;
default:
break;
}
}

@@ -105,7 +109,7 @@ - (void)verifyDeleteFlashRAM:(int)withTag;
}


- (void)explainMissingROM
- (void)explainMissingROM:(id)sender
{
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@"Newton ROM not found.\r\r"
@@ -115,11 +119,10 @@ - (void)explainMissingROM
"For more information please read the instructions at "
"https://github.com/pguyot/Einstein/wiki/Build-Instructions"
delegate:self
cancelButtonTitle:@"Quit Einstein"
destructiveButtonTitle:nil
cancelButtonTitle:nil
destructiveButtonTitle:@"Quit Einstein"
otherButtonTitles:nil];
[actionSheet setTag:3];
actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[actionSheet showInView:self.view];
#if !__has_feature(objc_arc)
[actionSheet release];
@@ -284,8 +287,13 @@ - (int)initEmulator
[theROMPath fileSystemRepresentation],
[theDebugROMPath fileSystemRepresentation],
[theDebugHighROMPath fileSystemRepresentation]);
//[self abortWithMessage: @"ROM file not found"];
[self explainMissingROM];

// Defer this call to explainMissingROM because self.view is not in the
// visible view hierarchy yet. (We arrive here from viewWillAppear due to
// other order-of-operations issues -- see issue #31)

[self performSelector:@selector(explainMissingROM:) withObject:self afterDelay:0];

mROMImage = 0L;
return 0;
}

0 comments on commit 14e70e5

Please sign in to comment.
You can’t perform that action at this time.