summaryrefslogtreecommitdiff
path: root/macosx/Source
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-11-15 03:44:07 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-11-15 03:44:07 +0000
commiteded81ac8a46a6948a18bea53bb9388f519c052b (patch)
tree5aa0e9143fda765d0cc50048264c69b94a8cdc43 /macosx/Source
parent8504c3e70831ccc3d9f648b4ed33f3cbc9ed2890 (diff)
OS X: change the dispatch_async in the freeze block to dispatch_after.
This makes it look cleaner. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@92247 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Source')
-rw-r--r--macosx/Source/PcsxrController.m5
1 files changed, 1 insertions, 4 deletions
diff --git a/macosx/Source/PcsxrController.m b/macosx/Source/PcsxrController.m
index 64067c54..a9c61523 100644
--- a/macosx/Source/PcsxrController.m
+++ b/macosx/Source/PcsxrController.m
@@ -589,10 +589,7 @@ otherblock();\
NSString *path = FileTestBlock();
LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPostRun argument:kPCSXRArgumentFreeze block:^{
if (![EmuThread isRunBios]) {
- // TODO: use another API to put up a timer, instead of sleeping
- dispatch_async(dispatch_get_global_queue(0, 0), ^{
- //Make sure the emulator is running
- sleep(5);
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_global_queue(0, 0), ^{
[EmuThread defrostAt:path];
});
}