mirror of https://github.com/snes9xgit/snes9x.git
Mac: fix pausing emulation when window is closed
This commit is contained in:
parent
bb619e5597
commit
81fb0d16ad
|
@ -65,12 +65,12 @@ static NSWindowFrameAutosaveName const kMainWindowIdentifier = @"s9xMainWindow";
|
|||
[window center];
|
||||
}
|
||||
|
||||
self.window = window;
|
||||
|
||||
[NSNotificationCenter.defaultCenter addObserverForName:NSWindowWillCloseNotification object:window queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification *notification)
|
||||
{
|
||||
[self.s9xEngine stop];
|
||||
[self.s9xEngine pause];
|
||||
}];
|
||||
|
||||
self.window = window;
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
|
|
Loading…
Reference in New Issue