diff -r 4f9d05416fd6 -r 91f889289a47 project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Thu Jan 20 01:27:51 2011 +0100 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Thu Jan 20 01:49:20 2011 +0100 @@ -186,11 +186,6 @@ name:@"show help ingame" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(cleanup) - name:@"remove overlay" - object:nil]; - // for iOS >= 3.2 if ([UIScreen respondsToSelector:@selector(screens)]) { [[NSNotificationCenter defaultCenter] addObserver:self @@ -235,7 +230,7 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - [self cleanup]; + HW_terminate(NO); } } @@ -257,13 +252,6 @@ doNotDim(); } --(void) cleanup { - [self dismissPopover]; - setGameRunning(NO); - HW_terminate(NO); - [self.view removeFromSuperview]; -} - -(void) didReceiveMemoryWarning { if (self.popupMenu.view.superview == nil) self.popupMenu = nil; @@ -457,7 +445,7 @@ // present a further check before closing game -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { if ([actionSheet cancelButtonIndex] != buttonIndex) - [self cleanup]; + HW_terminate(NO); else HW_pause(); }