GUI: Improve missing firmware handling

* Install PS3UPDAT.PUP at the spot when booting games whenever firmware is missing. The option to boot games without firmware is still supported when all firmware SPRX are HLEd in firmware settings.
* Pop-up a confirmation dialog in firmware installation if firmware is already installed.
This commit is contained in:
Eladash 2021-01-27 18:22:06 +02:00 committed by Megamouse
parent 3e7e077fad
commit a5d74c5e96
8 changed files with 55 additions and 13 deletions

View file

@ -1647,9 +1647,24 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
{
if (!fs::is_file(g_cfg.vfs.get_dev_flash() + "sys/external/liblv2.sprx"))
{
if (!GetCallbacks().on_missing_fw())
const auto libs = g_cfg.core.libraries_control.get_set();
extern const std::map<std::string_view, int> g_prx_list;
// Check if there are any firmware SPRX which may be LLEd during emulation
// Don't prompt GUI confirmation if there aren't any
if (std::any_of(g_prx_list.begin(), g_prx_list.end(), [&libs](auto& lib)
{
return libs.count(std::string(lib.first) + ":lle") || (!lib.second && !libs.count(std::string(lib.first) + ":hle"));
}))
{
Stop();
CallAfter([this]()
{
GetCallbacks().on_missing_fw();
});
return game_boot_result::firmware_missing;
}
}