(OSX) Get rid of 'isTerminating' variable

This commit is contained in:
Twinaphex 2014-07-10 22:11:47 +02:00
parent 0b3ef0b2ce
commit 650424c17c
2 changed files with 2 additions and 4 deletions

View File

@ -43,7 +43,6 @@
NSString* _file; NSString* _file;
NSString* _core; NSString* _core;
bool _isTerminating;
bool _loaded; bool _loaded;
bool _wantReload; bool _wantReload;
} }

View File

@ -200,7 +200,6 @@ static char** waiting_argv;
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
{ {
NSApplicationTerminateReply reply = NSTerminateNow; NSApplicationTerminateReply reply = NSTerminateNow;
_isTerminating = true;
if (g_extern.main_is_init) if (g_extern.main_is_init)
reply = NSTerminateCancel; reply = NSTerminateCancel;
@ -277,7 +276,7 @@ static char** waiting_argv;
[[NSApplication sharedApplication] endSheet:self.coreSelectSheet returnCode:0]; [[NSApplication sharedApplication] endSheet:self.coreSelectSheet returnCode:0];
[self.coreSelectSheet orderOut:self]; [self.coreSelectSheet orderOut:self];
if (_isTerminating) if (g_extern.system.shutdown)
return; return;
cb = (NSComboBox*)[[self.coreSelectSheet contentView] viewWithTag:1]; cb = (NSComboBox*)[[self.coreSelectSheet contentView] viewWithTag:1];
@ -298,7 +297,7 @@ static char** waiting_argv;
- (void)unloadingCore:(const NSString*)core - (void)unloadingCore:(const NSString*)core
{ {
if (_isTerminating) if (g_extern.system.shutdown)
[[NSApplication sharedApplication] terminate:nil]; [[NSApplication sharedApplication] terminate:nil];
if (_wantReload) if (_wantReload)