mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
System: Preserve controller type on core settings reset
This commit is contained in:
parent
8e95248ef3
commit
b6686b8239
|
@ -511,10 +511,7 @@ void Settings::Save(SettingsInterface& si) const
|
|||
si.SetBoolValue("BIOS", "PatchFastBoot", bios_patch_fast_boot);
|
||||
|
||||
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
|
||||
{
|
||||
si.SetStringValue(TinyString::FromFormat("Controller%u", i + 1u), "Type",
|
||||
GetControllerTypeName(controller_types[i]));
|
||||
}
|
||||
si.SetStringValue(Controller::GetSettingsSection(i).c_str(), "Type", GetControllerTypeName(controller_types[i]));
|
||||
|
||||
si.SetStringValue("MemoryCards", "Card1Type", GetMemoryCardTypeName(memory_card_types[0]));
|
||||
si.SetStringValue("MemoryCards", "Card2Type", GetMemoryCardTypeName(memory_card_types[1]));
|
||||
|
|
|
@ -800,6 +800,10 @@ void System::SetDefaultSettings(SettingsInterface& si)
|
|||
temp.display_show_cpu = g_settings.display_show_cpu;
|
||||
temp.display_show_gpu = g_settings.display_show_gpu;
|
||||
|
||||
// keep controller, we reset it elsewhere
|
||||
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
|
||||
temp.controller_types[i] = g_settings.controller_types[i];
|
||||
|
||||
temp.Save(si);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue