Skip to content

Commit

Permalink
Merge pull request #6288 from JosJuice/boot-savestate-thread
Browse files Browse the repository at this point in the history
Don't involve host thread when booting from savestate
  • Loading branch information
JosJuice committed Jan 5, 2018
2 parents 1197652 + c492a5a commit 6ad04fc
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Source/Core/Core/Core.cpp
Expand Up @@ -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();

Expand All @@ -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();

Expand Down

0 comments on commit 6ad04fc

Please sign in to comment.