diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-04 03:07:44 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-04 03:07:44 +0000 |
| commit | dd7da2fae96b9ba6bdbc28f7b26469373801f21e (patch) | |
| tree | 9faf6aa7f2fa2900dcabc3d88d11e87285693e9b /macosx/plugins/DFCdrom/macsrc/PluginConfigController.m | |
| parent | a012af37d7bd3a972d2b3fbb7ed09bc8662e91eb (diff) | |
| download | pcsxr-dd7da2fae96b9ba6bdbc28f7b26469373801f21e.tar.gz | |
Make the plug-ins use ARC in 64-bit mode.
Change how the preprocessor macros are managed on OS X.
Set the name of the product to the target name.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85795 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFCdrom/macsrc/PluginConfigController.m')
| -rwxr-xr-x | macosx/plugins/DFCdrom/macsrc/PluginConfigController.m | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m index 5e79fe63..801a47f2 100755 --- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m @@ -21,6 +21,7 @@ #import "PluginConfigController.h" #include "cdr.h" +#import "ARCBridge.h" #define APP_ID @"net.pcsxr.DFCdrom" #define PrefsKey APP_ID @" Settings" @@ -37,10 +38,12 @@ void AboutDlgProc() NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; NSAttributedString *credits; if (path) { - credits = [[[NSAttributedString alloc] initWithPath: path - documentAttributes:NULL] autorelease]; + credits = [[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL]; + AUTORELEASEOBJNORETURN(credits); + } else { - credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); } // Get Application Icon @@ -79,9 +82,9 @@ void ReadConfig() NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:YES], @"Threaded", - [NSNumber numberWithInt:64], @"Cache Size", - [NSNumber numberWithInt:0], @"Speed", + @YES, @"Threaded", + @64, @"Cache Size", + @0, @"Speed", nil], PrefsKey, nil]]; keyValues = [defaults dictionaryForKey:PrefsKey]; @@ -104,17 +107,17 @@ void ReadConfig() NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues]; - [writeDic setObject:[NSNumber numberWithBool:[Cached intValue]] forKey:@"Threaded"]; - [writeDic setObject:[NSNumber numberWithInt:[CacheSize intValue]] forKey:@"Cache Size"]; + [writeDic setObject:@((BOOL)[Cached intValue]) forKey:@"Threaded"]; + [writeDic setObject:@([CacheSize intValue]) forKey:@"Cache Size"]; switch ([CdSpeed indexOfSelectedItem]) { - case 1: [writeDic setObject:[NSNumber numberWithInt:1] forKey:@"Speed"]; break; - case 2: [writeDic setObject:[NSNumber numberWithInt:2] forKey:@"Speed"]; break; - case 3: [writeDic setObject:[NSNumber numberWithInt:4] forKey:@"Speed"]; break; - case 4: [writeDic setObject:[NSNumber numberWithInt:8] forKey:@"Speed"]; break; - case 5: [writeDic setObject:[NSNumber numberWithInt:16] forKey:@"Speed"]; break; - case 6: [writeDic setObject:[NSNumber numberWithInt:32] forKey:@"Speed"]; break; - default: [writeDic setObject:[NSNumber numberWithInt:0] forKey:@"Speed"]; break; + case 1: [writeDic setObject:@1 forKey:@"Speed"]; break; + case 2: [writeDic setObject:@2 forKey:@"Speed"]; break; + case 3: [writeDic setObject:@4 forKey:@"Speed"]; break; + case 4: [writeDic setObject:@8 forKey:@"Speed"]; break; + case 5: [writeDic setObject:@16 forKey:@"Speed"]; break; + case 6: [writeDic setObject:@32 forKey:@"Speed"]; break; + default: [writeDic setObject:@0 forKey:@"Speed"]; break; } // write to defaults @@ -134,7 +137,7 @@ void ReadConfig() ReadConfig(); // load from preferences - [keyValues release]; + RELEASEOBJ(keyValues); keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; [Cached setIntValue:[[keyValues objectForKey:@"Threaded"] intValue]]; |
