diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-09 07:07:15 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-09 07:07:15 +0000 |
| commit | b797c32f080fbdb69f4c84ace14a496b34423551 (patch) | |
| tree | 4b54874a4959adf6f011874c181fe5173620ab63 /macosx/EmuThread.m | |
| parent | e653d69b63a0be853f544d7c533f01817b0be0f4 (diff) | |
| download | pcsxr-b797c32f080fbdb69f4c84ace14a496b34423551.tar.gz | |
Changing a lot of NSLogs to SysPrintf on OS X's PCSXR.
Enable the emulog on OS X debug, and have create and use a log in ~/Library/Logs/PCSXR.
Delete the hack that enabled PCSXR logs to go to the console in debug mode.
Use modern syntax to create static NSArrays (and retain them in non-ARC code).
Simplify the pauseSafeWithBlock to just create a new dispatch queue and run pauseSafe on the queue.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85931 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/EmuThread.m')
| -rwxr-xr-x | macosx/EmuThread.m | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m index d3888ac2..28ef3814 100755 --- a/macosx/EmuThread.m +++ b/macosx/EmuThread.m @@ -67,7 +67,7 @@ static pthread_mutex_t eventMutex; int res = CheckCdrom(); if (res == -1) { ClosePlugins(); - SysMessage(_("Could not check CD-ROM!\n")); + SysMessage("%s", _("Could not check CD-ROM!\n")); goto done; } @@ -305,16 +305,7 @@ done: + (void)pauseSafeWithBlock:(void (^)(BOOL))theBlock { dispatch_async(dispatch_get_global_queue(0, 0), ^{ - BOOL wasPaused = NO; - if ((paused == 2) || ![EmuThread active]) - { - wasPaused = YES; - } else { - [EmuThread pause]; - while ([EmuThread isPaused] != 2) [NSThread sleepUntilDate:[[NSDate date] addTimeInterval:0.05]]; - wasPaused = NO; - } - + BOOL wasPaused = [self pauseSafe]; dispatch_async(dispatch_get_main_queue(), ^{theBlock(wasPaused);}); }); } |
