Cocoa Port:
- Enable Speed Limit, Enable Auto Frame Skip, and Enable Cheats options now remember their states between app runs, instead of always being reset to enabled on startup.
This commit is contained in:
parent
21faaa78b4
commit
a9750234c9
Binary file not shown.
|
@ -1037,8 +1037,8 @@
|
||||||
{
|
{
|
||||||
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setInteger:[cdsCore slot1DeviceType] forKey:@"EmulationSLOT1_DeviceType"];
|
[[NSUserDefaults standardUserDefaults] setInteger:[cdsCore slot1DeviceType] forKey:@"EmulationSlot1_DeviceType"];
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:[[cdsCore slot1R4URL] path] forKey:@"EmulationSLOT1_R4StoragePath"];
|
[[NSUserDefaults standardUserDefaults] setObject:[[cdsCore slot1R4URL] path] forKey:@"EmulationSlot1_R4StoragePath"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction) writeDefaultsSoundSettings:(id)sender
|
- (IBAction) writeDefaultsSoundSettings:(id)sender
|
||||||
|
@ -1226,11 +1226,13 @@
|
||||||
{
|
{
|
||||||
[cdsCore setIsSpeedLimitEnabled:NO];
|
[cdsCore setIsSpeedLimitEnabled:NO];
|
||||||
[self setStatusText:NSSTRING_STATUS_SPEED_LIMIT_DISABLED];
|
[self setStatusText:NSSTRING_STATUS_SPEED_LIMIT_DISABLED];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"CoreControl_EnableSpeedLimit"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[cdsCore setIsSpeedLimitEnabled:YES];
|
[cdsCore setIsSpeedLimitEnabled:YES];
|
||||||
[self setStatusText:NSSTRING_STATUS_SPEED_LIMIT_ENABLED];
|
[self setStatusText:NSSTRING_STATUS_SPEED_LIMIT_ENABLED];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"CoreControl_EnableSpeedLimit"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1250,11 +1252,13 @@
|
||||||
{
|
{
|
||||||
[cdsCore setIsFrameSkipEnabled:NO];
|
[cdsCore setIsFrameSkipEnabled:NO];
|
||||||
[self setStatusText:NSSTRING_STATUS_AUTO_FRAME_SKIP_DISABLED];
|
[self setStatusText:NSSTRING_STATUS_AUTO_FRAME_SKIP_DISABLED];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"CoreControl_EnableAutoFrameSkip"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[cdsCore setIsFrameSkipEnabled:YES];
|
[cdsCore setIsFrameSkipEnabled:YES];
|
||||||
[self setStatusText:NSSTRING_STATUS_AUTO_FRAME_SKIP_ENABLED];
|
[self setStatusText:NSSTRING_STATUS_AUTO_FRAME_SKIP_ENABLED];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"CoreControl_EnableAutoFrameSkip"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1274,11 +1278,13 @@
|
||||||
{
|
{
|
||||||
[cdsCore setIsCheatingEnabled:NO];
|
[cdsCore setIsCheatingEnabled:NO];
|
||||||
[self setStatusText:NSSTRING_STATUS_CHEATS_DISABLED];
|
[self setStatusText:NSSTRING_STATUS_CHEATS_DISABLED];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"CoreControl_EnableCheats"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[cdsCore setIsCheatingEnabled:YES];
|
[cdsCore setIsCheatingEnabled:YES];
|
||||||
[self setStatusText:NSSTRING_STATUS_CHEATS_ENABLED];
|
[self setStatusText:NSSTRING_STATUS_CHEATS_ENABLED];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"CoreControl_EnableCheats"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1860,7 +1866,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:[selectedDirURL path] forKey:@"EmulationSLOT1_R4StoragePath"];
|
[[NSUserDefaults standardUserDefaults] setObject:[selectedDirURL path] forKey:@"EmulationSlot1_R4StoragePath"];
|
||||||
|
|
||||||
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
||||||
[cdsCore setSlot1R4URL:selectedDirURL];
|
[cdsCore setSlot1R4URL:selectedDirURL];
|
||||||
|
|
|
@ -307,6 +307,13 @@
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification *)notification
|
- (void)applicationWillTerminate:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
|
CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content];
|
||||||
|
|
||||||
|
// Save some settings to user defaults before app termination
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore isSpeedLimitEnabled] forKey:@"CoreControl_EnableSpeedLimit"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore isFrameSkipEnabled] forKey:@"CoreControl_EnableAutoFrameSkip"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore isCheatingEnabled] forKey:@"CoreControl_EnableCheats"];
|
||||||
|
|
||||||
[cdsCoreController setContent:nil];
|
[cdsCoreController setContent:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,10 +451,15 @@
|
||||||
[cdsCore setMaxJITBlockSize:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_MaxJITBlockSize"]];
|
[cdsCore setMaxJITBlockSize:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_MaxJITBlockSize"]];
|
||||||
|
|
||||||
// Set the SLOT-1 device settings per user preferences.
|
// Set the SLOT-1 device settings per user preferences.
|
||||||
NSString *slot1R4Path = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"EmulationSLOT1_R4StoragePath"];
|
NSString *slot1R4Path = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"EmulationSlot1_R4StoragePath"];
|
||||||
[cdsCore setSlot1DeviceType:[[NSUserDefaults standardUserDefaults] integerForKey:@"EmulationSLOT1_DeviceType"]];
|
[cdsCore setSlot1DeviceType:[[NSUserDefaults standardUserDefaults] integerForKey:@"EmulationSlot1_DeviceType"]];
|
||||||
[cdsCore setSlot1R4URL:(slot1R4Path != nil) ? [NSURL fileURLWithPath:slot1R4Path] : nil];
|
[cdsCore setSlot1R4URL:(slot1R4Path != nil) ? [NSURL fileURLWithPath:slot1R4Path] : nil];
|
||||||
|
|
||||||
|
// Set the miscellaneous emulations settings per user preferences.
|
||||||
|
[cdsCore setIsSpeedLimitEnabled:[[NSUserDefaults standardUserDefaults] boolForKey:@"CoreControl_EnableSpeedLimit"]];
|
||||||
|
[cdsCore setIsFrameSkipEnabled:[[NSUserDefaults standardUserDefaults] boolForKey:@"CoreControl_EnableAutoFrameSkip"]];
|
||||||
|
[cdsCore setIsCheatingEnabled:[[NSUserDefaults standardUserDefaults] boolForKey:@"CoreControl_EnableCheats"]];
|
||||||
|
|
||||||
// Set up the firmware per user preferences.
|
// Set up the firmware per user preferences.
|
||||||
NSMutableDictionary *newFWDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
NSMutableDictionary *newFWDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||||
[[NSUserDefaults standardUserDefaults] objectForKey:@"FirmwareConfig_Nickname"], @"Nickname",
|
[[NSUserDefaults standardUserDefaults] objectForKey:@"FirmwareConfig_Nickname"], @"Nickname",
|
||||||
|
|
Loading…
Reference in New Issue