mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 08:05:41 +00:00
Settings: Always save controller type to settings interface
Fixes Controller1 defaulting to DigitalController type on startup in FullscreenUI when user had previously shut down the program with Controller1 set to None.
This commit is contained in:
parent
d6b8a80eb7
commit
b6301e1a43
|
@ -387,15 +387,11 @@ void Settings::Save(SettingsInterface& si) const
|
||||||
si.SetBoolValue("BIOS", "PatchTTYEnable", bios_patch_tty_enable);
|
si.SetBoolValue("BIOS", "PatchTTYEnable", bios_patch_tty_enable);
|
||||||
si.SetBoolValue("BIOS", "PatchFastBoot", bios_patch_fast_boot);
|
si.SetBoolValue("BIOS", "PatchFastBoot", bios_patch_fast_boot);
|
||||||
|
|
||||||
if (controller_types[0] != ControllerType::None)
|
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
|
||||||
si.SetStringValue("Controller1", "Type", GetControllerTypeName(controller_types[0]));
|
{
|
||||||
else
|
si.SetStringValue(TinyString::FromFormat("Controller%u", i + 1u), "Type",
|
||||||
si.DeleteValue("Controller1", "Type");
|
GetControllerTypeName(controller_types[i]));
|
||||||
|
}
|
||||||
if (controller_types[1] != ControllerType::None)
|
|
||||||
si.SetStringValue("Controller2", "Type", GetControllerTypeName(controller_types[1]));
|
|
||||||
else
|
|
||||||
si.DeleteValue("Controller2", "Type");
|
|
||||||
|
|
||||||
si.SetStringValue("MemoryCards", "Card1Type", GetMemoryCardTypeName(memory_card_types[0]));
|
si.SetStringValue("MemoryCards", "Card1Type", GetMemoryCardTypeName(memory_card_types[0]));
|
||||||
si.SetStringValue("MemoryCards", "Card1Path", memory_card_paths[0].c_str());
|
si.SetStringValue("MemoryCards", "Card1Path", memory_card_paths[0].c_str());
|
||||||
|
|
Loading…
Reference in a new issue