mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 20:15:32 +00:00
FullscreenUI: Fix setting BIOS to Auto Detect
This commit is contained in:
parent
58bd87666e
commit
ea3774cece
@ -4046,17 +4046,22 @@ void FullscreenUI::DrawBIOSSettingsPage()
|
|||||||
options.emplace_back(std::move(path), selected);
|
options.emplace_back(std::move(path), selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenChoiceDialog(title, false, std::move(options),
|
OpenChoiceDialog(
|
||||||
[game_settings, i](s32 index, const std::string& path, bool checked) {
|
title, false, std::move(options), [game_settings, i](s32 index, const std::string& path, bool checked) {
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto lock = Host::GetSettingsLock();
|
auto lock = Host::GetSettingsLock();
|
||||||
SettingsInterface* bsi = GetEditingSettingsInterface(game_settings);
|
SettingsInterface* bsi = GetEditingSettingsInterface(game_settings);
|
||||||
if (game_settings && index == 0)
|
if (game_settings && index == 0)
|
||||||
|
{
|
||||||
bsi->DeleteValue("BIOS", config_keys[i]);
|
bsi->DeleteValue("BIOS", config_keys[i]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
bsi->SetStringValue("BIOS", config_keys[i], path.c_str());
|
{
|
||||||
|
bsi->SetStringValue("BIOS", config_keys[i],
|
||||||
|
(index == static_cast<s32>(BoolToUInt32(game_settings))) ? "" : path.c_str());
|
||||||
|
}
|
||||||
SetSettingsChanged(bsi);
|
SetSettingsChanged(bsi);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user