Merge pull request #6288 from JosJuice/boot-savestate-thread
Don't involve host thread when booting from savestate
This commit is contained in:
commit
6ad04fc589
|
@ -341,15 +341,6 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
|
||||||
if (_CoreParameter.bFastmem)
|
if (_CoreParameter.bFastmem)
|
||||||
EMM::InstallExceptionHandler(); // Let's run under memory watch
|
EMM::InstallExceptionHandler(); // Let's run under memory watch
|
||||||
|
|
||||||
if (savestate_path)
|
|
||||||
{
|
|
||||||
QueueHostJob([&savestate_path, delete_savestate] {
|
|
||||||
::State::LoadAs(*savestate_path);
|
|
||||||
if (delete_savestate)
|
|
||||||
File::Delete(*savestate_path);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
s_is_started = true;
|
s_is_started = true;
|
||||||
CPUSetInitialExecutionState();
|
CPUSetInitialExecutionState();
|
||||||
|
|
||||||
|
@ -374,6 +365,13 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
|
||||||
MemoryWatcher::Init();
|
MemoryWatcher::Init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (savestate_path)
|
||||||
|
{
|
||||||
|
::State::LoadAs(*savestate_path);
|
||||||
|
if (delete_savestate)
|
||||||
|
File::Delete(*savestate_path);
|
||||||
|
}
|
||||||
|
|
||||||
// Enter CPU run loop. When we leave it - we are done.
|
// Enter CPU run loop. When we leave it - we are done.
|
||||||
CPU::Run();
|
CPU::Run();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue