summaryrefslogtreecommitdiff
path: root/macosx/Source/ConfigurationController.m
diff options
context:
space:
mode:
authoriCatButler <i.am.catbutler@gmail.com>2018-03-13 17:23:50 +0000
committerGitHub <noreply@github.com>2018-03-13 17:23:50 +0000
commit15fe3782c1375634b7a9bd9bbbadfd75e7b06fed (patch)
tree6660b9aeb3f4aedf384a0a1c76d3a849d4f43146 /macosx/Source/ConfigurationController.m
parent540dccfdbd162f247d2390ac35df4144b28aab44 (diff)
parent13c17e4b6ef1eee9ad60d3db2016ebb8e54bf337 (diff)
downloadpcsxr-15fe3782c1375634b7a9bd9bbbadfd75e7b06fed.tar.gz
Merge pull request #5 from MrLavender/master
Fix 64-bit dynarec integration and update OS X build
Diffstat (limited to 'macosx/Source/ConfigurationController.m')
-rw-r--r--macosx/Source/ConfigurationController.m28
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