summaryrefslogtreecommitdiff
path: root/macosx/CheatController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-08 07:26:30 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-08 07:26:30 +0000
commit7feee6f616e56e96cccdee173abb994a6d0bf91c (patch)
treec7c4e0c243b93eae9ecd0a23e011aac412ab1fec /macosx/CheatController.m
parent673809f1f115c90558b87df1529f9e3c9acc1270 (diff)
downloadpcsxr-7feee6f616e56e96cccdee173abb994a6d0bf91c.tar.gz
Various updates and improvements to OS X code.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85894 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/CheatController.m')
-rw-r--r--macosx/CheatController.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/macosx/CheatController.m b/macosx/CheatController.m
index ebb0d4b9..70f8688b 100644
--- a/macosx/CheatController.m
+++ b/macosx/CheatController.m
@@ -13,8 +13,7 @@
- (id)init
{
- self = [self initWithWindowNibName:@"CheatWindow"];
- return self;
+ return self = [self initWithWindowNibName:@"CheatWindow"];
}
- (void)refresh
@@ -34,8 +33,7 @@
NSString *ident = [col identifier];
if ([ident isEqualToString:@"COL_NAME"]) {
return @(Cheats[idx].Descr);
- }
- if ([ident isEqualToString:@"COL_ENABLE"]) {
+ } else if ([ident isEqualToString:@"COL_ENABLE"]) {
return @(Cheats[idx].Enabled ? NSOnState : NSOffState);
}
NSLog(@"Unknown column identifier: %@", ident);
@@ -49,7 +47,10 @@
NSString *ident = [col identifier];
if ([ident isEqualToString:@"COL_ENABLE"]) {
Cheats[row].Enabled = [object integerValue] == NSOnState;
- }
+ } else if ([ident isEqualToString:@"COL_NAME"]) {
+ free(Cheats[row].Descr);
+ Cheats[row].Descr = strdup([object UTF8String]);
+ }
}
- (IBAction)LoadCheats:(id)sender