From de13f7dcbaa84255fa578aafe862f90c46225a01 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 21 Aug 2013 23:19:04 +0000 Subject: Fix OS X 10.8-only behavior in the XGL plug-in. Remove some commented-out code on Cocoa code. Change some ints passed in Cocoa code to NSIntegers. Replace a deprecated function call to NSRunAlertPanelRelativeToWindow. Other minor fixes and improvements. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86808 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/ConfigurationController.m | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'macosx/ConfigurationController.m') diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m index 186772f7..0c5265d9 100755 --- a/macosx/ConfigurationController.m +++ b/macosx/ConfigurationController.m @@ -13,7 +13,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; @implementation ConfigurationController -+ (void)setMemoryCard:(int)theCard toURL:(NSURL *)theURL; ++ (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL; { if (theCard == 1) { [[NSUserDefaults standardUserDefaults] setURL:theURL forKey:@"Mcd1"]; @@ -27,7 +27,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [NSDictionary dictionaryWithObject:@(theCard) forKey:memCardChangeNumberKey]]; } -+ (void)setMemoryCard:(int)theCard toPath:(NSString *)theFile ++ (void)setMemoryCard:(NSInteger)theCard toPath:(NSString *)theFile { [self setMemoryCard:theCard toURL:[NSURL fileURLWithPath:theFile isDirectory:NO]]; } @@ -83,7 +83,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; if ([openDlg runModal] == NSFileHandlingPanelOKButton) { NSURL *mcdURL = [[openDlg URLs] objectAtIndex:0]; - [ConfigurationController setMemoryCard:(int)tag toURL:mcdURL]; + [ConfigurationController setMemoryCard:tag toURL:mcdURL]; } RELEASEOBJ(openDlg); } @@ -114,7 +114,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; strlcpy(mcd, [[mcdURL path] fileSystemRepresentation], MAXPATHLEN); CreateMcd(mcd); - [ConfigurationController setMemoryCard:(int)tag toURL:mcdURL]; + [ConfigurationController setMemoryCard:tag toURL:mcdURL]; } RELEASEOBJ(openDlg); } @@ -223,9 +223,9 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; #if !__has_feature(objc_arc) - (void)dealloc { - RELEASEOBJ(checkBoxDefaults); + [checkBoxDefaults release]; - SUPERDEALLOC; + [super dealloc]; } #endif @@ -233,9 +233,8 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; { for (NSString *key in checkBoxDefaults) { id object = [checkBoxDefaults objectForKey:key]; - if ([object isEqual:sender]) { + if ([object isEqual:sender]) return key; - } } return nil; -- cgit v1.2.3