diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-22 04:16:10 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-22 04:16:10 +0000 |
| commit | 4915c5c9f9a86607f3ccdd6eb7c40cc21657fd5c (patch) | |
| tree | b7e6c5c2639d10733abf434c2c55623e846371d5 /macosx/EmuThread.m | |
| parent | da6c47c68c4b154274bddaf141a31832531fb4ab (diff) | |
| download | pcsxr-4915c5c9f9a86607f3ccdd6eb7c40cc21657fd5c.tar.gz | |
Take into account if a user closed the emulator window before a new CD became available on OS X.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87257 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/EmuThread.m')
| -rwxr-xr-x | macosx/EmuThread.m | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m index 29f13da8..dc26f9df 100755 --- a/macosx/EmuThread.m +++ b/macosx/EmuThread.m @@ -36,18 +36,18 @@ static pthread_mutex_t eventMutex; NSAssert(![[NSThread currentThread] isEqual:[NSThread mainThread]], @"This function should not be run on the main thread!"); [[NSThread currentThread] setName:@"PSX Emu Background thread"]; + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + [center addObserver:self + selector:@selector(emuWindowDidClose:) + name:@"emuWindowDidClose" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(emuWindowDidClose:) - name:@"emuWindowDidClose" object:nil]; + [center addObserver:self + selector:@selector(emuWindowWantPause:) + name:@"emuWindowWantPause" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(emuWindowWantPause:) - name:@"emuWindowWantPause" object:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(emuWindowWantResume:) - name:@"emuWindowWantResume" object:nil]; + [center addObserver:self + selector:@selector(emuWindowWantResume:) + name:@"emuWindowWantResume" object:nil]; // we shouldn't change the priority, since we might depend on subthreads //[NSThread setThreadPriority:1.0-((1.0-[NSThread threadPriority])/4.0)]; |
