System: Fix Kill calling duplication
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run

This commit is contained in:
elad335 2025-05-09 11:14:04 +03:00 committed by Elad
parent 21cdbd90e9
commit d21358e91f

View File

@ -2950,7 +2950,7 @@ void Emulator::GracefulShutdown(bool allow_autoexit, bool async_op, bool savesta
sys_log.notice("The game was requested to exit. Waiting for its reaction...");
auto perform_kill = [read_counter, allow_autoexit, this, info = GetEmulationIdentifier()]()
auto perform_kill = [read_counter, allow_autoexit, this, info = old_emu_id]()
{
bool read_sysutil_signal = false;
std::vector<stx::shared_ptr<named_thread<ppu_thread>>> ppu_thread_list;
@ -3018,14 +3018,14 @@ void Emulator::GracefulShutdown(bool allow_autoexit, bool async_op, bool savesta
return false;
});
if (Emu.IsStopped(true))
{
return;
}
// An inevitable attempt to terminate the *current* emulation course will be issued after the timeout was reached.
CallFromMainThread([this, allow_autoexit, elapsed_ms, read_sysutil_signal]()
{
if (Emu.IsStopped())
{
return;
}
sys_log.error("The game did not react to the exit request in time. Terminating manually... (read_sysutil_signal=%d, elapsed_ms=%d)", read_sysutil_signal, elapsed_ms);
Kill(allow_autoexit);
}, info);