Permalink
Browse files

Mac GUI: shutdownLogging should always get called on termination

  • Loading branch information...
1 parent 8fa4a22 commit 92268da6f9bcdc2b912b436f8b484e9285bfc1f6 @bradallred bradallred committed Jun 8, 2013
Showing with 2 additions and 6 deletions.
  1. +2 −6 apple/CocoaWrapper/mac/CocoaWrapper.mm
@@ -76,8 +76,7 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *) __un
- (void)applicationWillTerminate:(NSNotification *) __unused aNotification
{
- //override this method using plugin categories.
- NSLog(@"Application terminate");
+ ShutdownLogging();
}
// always called before openFile when launched via CLI/DragDrop
@@ -186,12 +185,9 @@ - (IBAction)launchGame:(id) __unused sender
delete config;
core->Main();
delete( core );
- ShutdownLogging();
// We must exit since the application runloop never returns.
- // TODO: we want to be able to use NSApplication terminate method
- // need fancier logic in shouldTerminate implementation first (in SDL plugin)
- exit(status);
+ [NSApp terminate:self];
}
}

0 comments on commit 92268da

Please sign in to comment.