diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-13 21:31:56 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-13 21:31:56 +0000 |
| commit | de50d760fd03a7eed9a614a3d4a701f2097c88d9 (patch) | |
| tree | abd27fe9c76372b7b819670dd15ec859de94e164 /macosx/ConfigurationController.m | |
| parent | 56d5b481986072f06ac516f43b68ec1d5b3aac1b (diff) | |
| download | pcsxr-de50d760fd03a7eed9a614a3d4a701f2097c88d9.tar.gz | |
Changing a few Objective C classes to have their ivars hidden.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87167 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/ConfigurationController.m')
| -rwxr-xr-x | macosx/ConfigurationController.m | 70 |
1 files changed, 46 insertions, 24 deletions
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m index 7fa92416..4dcb3afd 100755 --- a/macosx/ConfigurationController.m +++ b/macosx/ConfigurationController.m @@ -10,7 +10,28 @@ NSString *const memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier"; NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; +@interface ConfigurationController () +@property (strong) NSMutableDictionary *checkBoxDefaults; +- (NSString *)keyForSender:(id)sender; +@end + @implementation ConfigurationController +@synthesize autoVTypeCell; +@synthesize bwMdecCell; +@synthesize checkBoxDefaults = _checkBoxDefaults; +@synthesize consoleOutputCell; +@synthesize enableNetPlayCell; +@synthesize noCDAudioCell; +@synthesize noFastBootCell; +@synthesize noXaAudioCell; +@synthesize rCountFixCell; +@synthesize sioIrqAlwaysCell; +@synthesize spuIrqAlwaysCell; +@synthesize usesDynarecCell; +@synthesize usesHleCell; +@synthesize vSyncWAFixCell; +@synthesize vTypePALCell; +@synthesize widescreen; + (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL; { @@ -119,12 +140,13 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; - (IBAction)setVideoType:(id)sender { NSInteger tag = [[sender selectedItem] tag]; - + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + if (3 == tag) { - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"AutoDetectVideoType"]; + [defaults setBool:YES forKey:@"AutoDetectVideoType"]; } else if (1 == tag || 2 == tag) { - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"AutoDetectVideoType"]; - [[NSUserDefaults standardUserDefaults] setBool:tag==2 forKey:@"VideoTypePAL"]; + [defaults setBool:NO forKey:@"AutoDetectVideoType"]; + [defaults setBool:tag==2 forKey:@"VideoTypePAL"]; } else { return; } @@ -147,30 +169,30 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [[self window] center]; // setup checkboxes - checkBoxDefaults = [[NSMutableDictionary alloc] init]; + self.checkBoxDefaults = [[NSMutableDictionary alloc] init]; // check that the outlets are active before adding them - if (noXaAudioCell) checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell; - if (enableNetPlayCell) checkBoxDefaults[@"NetPlay"] = enableNetPlayCell; - if (sioIrqAlwaysCell) checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell; - if (bwMdecCell) checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell; - if (autoVTypeCell) checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell; - if (vTypePALCell) checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell; - if (noCDAudioCell) checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell; - if (usesHleCell) checkBoxDefaults[@"UseHLE"] = usesHleCell; - if (usesDynarecCell) checkBoxDefaults[@"NoDynarec"] = usesDynarecCell; - if (consoleOutputCell) checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell; - if (spuIrqAlwaysCell) checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell; - if (rCountFixCell) checkBoxDefaults[@"RootCounterFix"] = rCountFixCell; - if (vSyncWAFixCell) checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell; - if (noFastBootCell) checkBoxDefaults[@"NoFastBoot"] = noFastBootCell; - if (widescreen) checkBoxDefaults[@"Widescreen"] = widescreen; + if (noXaAudioCell) _checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell; + if (enableNetPlayCell) _checkBoxDefaults[@"NetPlay"] = enableNetPlayCell; + if (sioIrqAlwaysCell) _checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell; + if (bwMdecCell) _checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell; + if (autoVTypeCell) _checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell; + if (vTypePALCell) _checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell; + if (noCDAudioCell) _checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell; + if (usesHleCell) _checkBoxDefaults[@"UseHLE"] = usesHleCell; + if (usesDynarecCell) _checkBoxDefaults[@"NoDynarec"] = usesDynarecCell; + if (consoleOutputCell) _checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell; + if (spuIrqAlwaysCell) _checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell; + if (rCountFixCell) _checkBoxDefaults[@"RootCounterFix"] = rCountFixCell; + if (vSyncWAFixCell) _checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell; + if (noFastBootCell) _checkBoxDefaults[@"NoFastBoot"] = noFastBootCell; + if (widescreen) _checkBoxDefaults[@"Widescreen"] = widescreen; // make the visuals match the defaults - for (NSString* key in checkBoxDefaults) { + for (NSString* key in _checkBoxDefaults) { if ([defaults integerForKey:key]) { - [checkBoxDefaults[key] setNextState]; + [_checkBoxDefaults[key] setNextState]; } } @@ -214,8 +236,8 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; - (NSString *)keyForSender:(id)sender { - for (NSString *key in checkBoxDefaults) { - id object = checkBoxDefaults[key]; + for (NSString *key in [self.checkBoxDefaults keyEnumerator]) { + id object = (self.checkBoxDefaults)[key]; if ([object isEqual:sender]) return key; } |
