Don't involve host thread when booting from savestate

Suggested by https://github.com/dolphin-emu/dolphin/pull/6271#discussion_r159868704
This commit is contained in:
JosJuice 2018-01-05 14:08:09 +01:00
parent e705d43312
commit c492a5a86a
1 changed files with 7 additions and 9 deletions

View File

@ -341,15 +341,6 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
if (_CoreParameter.bFastmem)
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;
CPUSetInitialExecutionState();
@ -374,6 +365,13 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
MemoryWatcher::Init();
#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.
CPU::Run();