From e68904da2ee403030e454bad73cd8dcfe6d3715c Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Sun, 3 Mar 2013 00:39:53 +0000 Subject: Apply patch 13980, with fixes to get it working properly. This allows a cheat interface for OS X. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@83306 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxrController.m | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'macosx/PcsxrController.m') diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m index 8ba710c4..387cd029 100755 --- a/macosx/PcsxrController.m +++ b/macosx/PcsxrController.m @@ -1,6 +1,7 @@ #import #import "PcsxrController.h" #import "ConfigurationController.h" +#import "CheatController.h" #import "EmuThread.h" #import "PcsxrMemCardHandler.h" #import "PcsxrPluginHandler.h" @@ -86,6 +87,21 @@ NSString *saveStatePath; } } +- (IBAction)showCheatsWindow:(id)sender +{ + /* load the nib if it hasn't yet */ + if (cheatWindow == nil) { + if (cheatController == nil) { + cheatController = [[CheatController alloc] initWithWindowNibName:@"CheatWindow"]; + } + cheatWindow = [cheatController window]; + } + + /* show the window */ + //[cheatWindow makeKeyAndOrderFront:sender]; + [cheatController showWindow:sender]; +} + - (IBAction)preferences:(id)sender { /* load the nib if it hasn't yet */ @@ -97,8 +113,8 @@ NSString *saveStatePath; } /* show the window */ - [preferenceWindow makeKeyAndOrderFront:self]; - [preferencesController showWindow:self]; + //[preferenceWindow makeKeyAndOrderFront:sender]; + [preferencesController showWindow:sender]; } - (IBAction)reset:(id)sender @@ -216,6 +232,10 @@ NSString *saveStatePath; if ([preferencesController isMemoryCardWindowVisible] == YES) return NO; } + + if (cheatWindow != nil) + if ([cheatWindow isVisible]) + return NO; if ([menuItem action] == @selector(runBios:) && strcmp(Config.Bios, "HLE") == 0) return NO; @@ -238,7 +258,7 @@ NSString *saveStatePath; [menuItem setState:(sleepInBackground ? NSOnState : NSOffState)]; return YES; } - + return YES; } -- cgit v1.2.3