diff options
| author | iCatButler <i.am.catbutler@gmail.com> | 2018-03-13 17:25:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-13 17:25:03 +0000 |
| commit | 2d0b10f982e0b835f4b27be26b138703907a4219 (patch) | |
| tree | e6ca381effb72ccc4161d40f224b817a6631bc03 /macosx/Source/ConfigurationController.m | |
| parent | ed3dc690e04382dce36305091ad2e14038147ab4 (diff) | |
| parent | 15fe3782c1375634b7a9bd9bbbadfd75e7b06fed (diff) | |
| download | pcsxr-2d0b10f982e0b835f4b27be26b138703907a4219.tar.gz | |
Merge branch 'master' into fix-linux-build
Diffstat (limited to 'macosx/Source/ConfigurationController.m')
| -rw-r--r-- | macosx/Source/ConfigurationController.m | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/macosx/Source/ConfigurationController.m b/macosx/Source/ConfigurationController.m index c7b63335..7485e067 100644 --- a/macosx/Source/ConfigurationController.m +++ b/macosx/Source/ConfigurationController.m @@ -41,6 +41,9 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; @synthesize memCardEdit; @synthesize hkController; @synthesize hkTab; +@synthesize cpuOverclocking; +@synthesize wipeoutMemHack; +@synthesize cpuOverclockingValue; + (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL; { @@ -178,6 +181,26 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; } } +- (IBAction)setOverclockValue:(NSComboBox *)sender +{ + float value = sender.floatValue; + if (value < 0.5) value = 0.5; + if (value > 5.0) value = 5.0; + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setFloat:value forKey:@"CpuOverclockingValue"]; + [PcsxrController setConfigFromDefaults]; + + [self setOverclockValueText]; +} + +- (void)setOverclockValueText +{ + NSString *value = [NSString stringWithFormat:@"%.2f", Config.PsxClock]; + [cpuOverclockingValue setStringValue:value]; + [cpuOverclockingValue selectItemWithObjectValue:value]; +} + - (void)awakeFromNib { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; @@ -218,6 +241,10 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; _checkBoxDefaults[@"NoFastBoot"] = noFastBootCell; if (widescreen) _checkBoxDefaults[@"Widescreen"] = widescreen; + if (cpuOverclocking) + _checkBoxDefaults[@"CpuOverclocking"] = cpuOverclocking; + if (wipeoutMemHack) + _checkBoxDefaults[@"WipeoutMemHack"] = wipeoutMemHack; // make the visuals match the defaults @@ -234,6 +261,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; [usesHleCell setEnabled:NO]; } + [self setOverclockValueText]; // setup labels |
