summaryrefslogtreecommitdiff
path: root/macosx/PcsxrController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-24 19:03:21 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-24 19:03:21 +0000
commit2082062cd85a3cadf38c6d7644b9f27b4d5616e5 (patch)
treef81bbaf6401b6e87e6839be434dca90c25eb439a /macosx/PcsxrController.m
parente542a8ec7278272ae06117cc09f9352dcff49de9 (diff)
downloadpcsxr-2082062cd85a3cadf38c6d7644b9f27b4d5616e5.tar.gz
Hack to make it so that pausing when PCSXR is in the background can be disabled.
I would like it so that it was in the preference window. Maybe I can do that later. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72609 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrController.m')
-rw-r--r--macosx/PcsxrController.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m
index 148e0b7b..eff82832 100644
--- a/macosx/PcsxrController.m
+++ b/macosx/PcsxrController.m
@@ -142,6 +142,11 @@ NSString *saveStatePath;
GPU_keypressed(GPU_FULLSCREEN_KEY);
}
+- (IBAction)pauseInBackground:(id)sender
+{
+ sleepInBackground = !sleepInBackground;
+}
+
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
if ([menuItem action] == @selector(pause:)) {
@@ -178,6 +183,11 @@ NSString *saveStatePath;
if ([menuItem action] == @selector(preferences:))
return ![EmuThread active];
+ if ([menuItem action] == @selector(pauseInBackground:)) {
+ [menuItem setState:(sleepInBackground ? NSOnState : NSOffState)];
+ return YES;
+ }
+
return YES;
}