mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Fix #9879 and fix firmware confirmation dialog when auto-start is disabled
This commit is contained in:
parent
e9a45a2f45
commit
55c98bfaef
1 changed files with 36 additions and 27 deletions
|
@ -1690,13 +1690,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
|
||||||
return game_boot_result::invalid_file_or_folder;
|
return game_boot_result::invalid_file_or_folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure(IsReady());
|
if (ppu_exec == elf_error::ok && !fs::is_file(g_cfg.vfs.get_dev_flash() + "sys/external/liblv2.sprx"))
|
||||||
|
|
||||||
if (m_force_boot || g_cfg.misc.autostart)
|
|
||||||
{
|
|
||||||
if (ppu_exec == elf_error::ok)
|
|
||||||
{
|
|
||||||
if (!fs::is_file(g_cfg.vfs.get_dev_flash() + "sys/external/liblv2.sprx"))
|
|
||||||
{
|
{
|
||||||
const auto libs = g_cfg.core.libraries_control.get_set();
|
const auto libs = g_cfg.core.libraries_control.get_set();
|
||||||
|
|
||||||
|
@ -1709,6 +1703,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
|
||||||
return libs.count(std::string(lib.first) + ":lle") || (!lib.second && !libs.count(std::string(lib.first) + ":hle"));
|
return libs.count(std::string(lib.first) + ":lle") || (!lib.second && !libs.count(std::string(lib.first) + ":hle"));
|
||||||
}))
|
}))
|
||||||
{
|
{
|
||||||
|
SetForceBoot(true);
|
||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
CallAfter([this]()
|
CallAfter([this]()
|
||||||
|
@ -1720,10 +1715,21 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool autostart = (std::exchange(m_force_boot, false) || g_cfg.misc.autostart);
|
||||||
|
|
||||||
|
if (IsReady())
|
||||||
|
{
|
||||||
|
if (autostart)
|
||||||
|
{
|
||||||
Run(true);
|
Run(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
m_force_boot = false;
|
else
|
||||||
|
{
|
||||||
|
ensure(m_state == system_state::paused);
|
||||||
|
Resume(); // Remove paused flag from threads
|
||||||
|
m_state = system_state::ready;
|
||||||
|
GetCallbacks().on_ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
return game_boot_result::no_errors;
|
return game_boot_result::no_errors;
|
||||||
|
@ -1768,7 +1774,10 @@ bool Emulator::Pause()
|
||||||
// Try to pause
|
// Try to pause
|
||||||
if (!m_state.compare_and_swap_test(system_state::running, system_state::paused))
|
if (!m_state.compare_and_swap_test(system_state::running, system_state::paused))
|
||||||
{
|
{
|
||||||
return m_state.compare_and_swap_test(system_state::ready, system_state::paused);
|
if (!m_state.compare_and_swap_test(system_state::ready, system_state::paused))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Signal profilers to print results (if enabled)
|
// Signal profilers to print results (if enabled)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue