diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-10 18:43:18 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-10 18:43:18 +0000 |
| commit | 4b4f074b6659f33b4f9e1c9784861409d8debd97 (patch) | |
| tree | 0fbd7f1ea28c9431cd8bafbaaac5d689d55d5dd6 /macosx/ConfigurationController.m | |
| parent | a3ac4842bd5c7058b1363f7d3307f61724fc7178 (diff) | |
| download | pcsxr-4b4f074b6659f33b4f9e1c9784861409d8debd97.tar.gz | |
Convert Objective-C code to modern syntax, mainly for the NSDictionaries.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87115 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/ConfigurationController.m')
| -rwxr-xr-x | macosx/ConfigurationController.m | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m index f21f13e7..7fa92416 100755 --- a/macosx/ConfigurationController.m +++ b/macosx/ConfigurationController.m @@ -23,7 +23,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; } [[NSNotificationCenter defaultCenter] postNotificationName:memChangeNotifier object:nil userInfo: - [NSDictionary dictionaryWithObject:@(theCard) forKey:memCardChangeNumberKey]]; + @{memCardChangeNumberKey: @(theCard)}]; } + (void)setMemoryCard:(NSInteger)theCard toPath:(NSString *)theFile @@ -80,7 +80,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [openDlg setNameFieldStringValue:[path lastPathComponent]]; if ([openDlg runModal] == NSFileHandlingPanelOKButton) { - NSURL *mcdURL = [[openDlg URLs] objectAtIndex:0]; + NSURL *mcdURL = [openDlg URLs][0]; [ConfigurationController setMemoryCard:tag toURL:mcdURL]; } @@ -150,27 +150,27 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; checkBoxDefaults = [[NSMutableDictionary alloc] init]; // check that the outlets are active before adding them - if (noXaAudioCell) [checkBoxDefaults setObject:noXaAudioCell forKey:@"NoXaAudio"]; - if (enableNetPlayCell) [checkBoxDefaults setObject:enableNetPlayCell forKey:@"NetPlay"]; - if (sioIrqAlwaysCell) [checkBoxDefaults setObject:sioIrqAlwaysCell forKey:@"SioIrqAlways"]; - if (bwMdecCell) [checkBoxDefaults setObject:bwMdecCell forKey:@"BlackAndWhiteMDECVideo"]; - if (autoVTypeCell) [checkBoxDefaults setObject:autoVTypeCell forKey:@"AutoDetectVideoType"]; - if (vTypePALCell) [checkBoxDefaults setObject:vTypePALCell forKey:@"VideoTypePAL"]; - if (noCDAudioCell) [checkBoxDefaults setObject:noCDAudioCell forKey:@"NoCDAudio"]; - if (usesHleCell) [checkBoxDefaults setObject:usesHleCell forKey:@"UseHLE"]; - if (usesDynarecCell) [checkBoxDefaults setObject:usesDynarecCell forKey:@"NoDynarec"]; - if (consoleOutputCell) [checkBoxDefaults setObject:consoleOutputCell forKey:@"ConsoleOutput"]; - if (spuIrqAlwaysCell) [checkBoxDefaults setObject:spuIrqAlwaysCell forKey:@"SpuIrqAlways"]; - if (rCountFixCell) [checkBoxDefaults setObject:rCountFixCell forKey:@"RootCounterFix"]; - if (vSyncWAFixCell) [checkBoxDefaults setObject:vSyncWAFixCell forKey:@"VideoSyncWAFix"]; - if (noFastBootCell) [checkBoxDefaults setObject:noFastBootCell forKey:@"NoFastBoot"]; - if (widescreen) [checkBoxDefaults setObject:widescreen forKey:@"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) { if ([defaults integerForKey:key]) { - [[checkBoxDefaults objectForKey:key] setNextState]; + [checkBoxDefaults[key] setNextState]; } } @@ -215,7 +215,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; - (NSString *)keyForSender:(id)sender { for (NSString *key in checkBoxDefaults) { - id object = [checkBoxDefaults objectForKey:key]; + id object = checkBoxDefaults[key]; if ([object isEqual:sender]) return key; } |
