From 946e44f786311b367a0f66de424e42330de7cbc0 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Mon, 2 Nov 2009 12:23:10 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34885 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxController.m | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'macosx/PcsxController.m') diff --git a/macosx/PcsxController.m b/macosx/PcsxController.m index 3d12ee66..4ff909b7 100644 --- a/macosx/PcsxController.m +++ b/macosx/PcsxController.m @@ -19,7 +19,7 @@ NSString *saveStatePath; NSMutableString *deviceName; NSTask *ejectTask; NSRange rdiskRange; - + BOOL wasPaused = [EmuThread pauseSafe]; /* close connection to current cd */ @@ -92,7 +92,7 @@ NSString *saveStatePath; } preferenceWindow = [preferencesController window]; } - + /* show the window */ [preferenceWindow makeKeyAndOrderFront:self]; [preferencesController showWindow:self]; @@ -157,8 +157,14 @@ NSString *saveStatePath; [menuItem action] == @selector(fullscreen:)) return [EmuThread active]; - if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:)) - return ![EmuThread active]; + if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:)) { + if (preferenceWindow != nil) { + if ([preferenceWindow isVisible]) { + return NO; + } + } + return ![EmuThread active]; + } if ([menuItem action] == @selector(defrost:)) { if (![EmuThread active]) @@ -167,7 +173,13 @@ NSString *saveStatePath; NSString *path = [NSString stringWithFormat:@"%@/%s-%3.3d.pcsxstate", saveStatePath, CdromId, [menuItem tag]]; return (CheckState((char *)[path fileSystemRepresentation]) == 0); } - + + if ([menuItem action] == @selector(preferences:)) { + if ([EmuThread active]) + return NO; + return YES; + } + return YES; } -- cgit v1.2.3