summaryrefslogtreecommitdiff
path: root/macosx/EmuThread.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/EmuThread.m')
-rwxr-xr-xmacosx/EmuThread.m20
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)];