mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
System.cpp: Fix Kill() on bad app startup
This commit is contained in:
parent
f3b9d64df7
commit
9a2bcd2508
@ -946,9 +946,24 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
|
|||||||
|
|
||||||
auto restore_on_no_boot = [&](game_boot_result result)
|
auto restore_on_no_boot = [&](game_boot_result result)
|
||||||
{
|
{
|
||||||
if (IsStopped() || result != game_boot_result::no_errors)
|
if (m_state == system_state::stopped || result != game_boot_result::no_errors)
|
||||||
{
|
{
|
||||||
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
ensure(IsStopped());
|
||||||
|
|
||||||
|
if (m_state == system_state::stopped)
|
||||||
|
{
|
||||||
|
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ensure(m_state == system_state::stopping);
|
||||||
|
|
||||||
|
// Execute after Kill() is done
|
||||||
|
Emu.after_kill_callback = [save_args = std::move(save_args), this]() mutable
|
||||||
|
{
|
||||||
|
std::tie(m_path, m_path_original, argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_path) = std::move(save_args);
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user