Core: Reset memory watcher on same thread which allocates it

This commit is contained in:
Stenzek 2019-12-09 20:06:07 +10:00
parent 6f274092b6
commit c602cb2e2f
1 changed files with 4 additions and 3 deletions

View File

@ -295,9 +295,6 @@ void Stop() // - Hammertime!
ResetRumble();
#ifdef USE_MEMORYWATCHER
s_memory_watcher.reset();
#endif
}
void DeclareAsCPUThread()
@ -374,6 +371,10 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
// Enter CPU run loop. When we leave it - we are done.
CPU::Run();
#ifdef USE_MEMORYWATCHER
s_memory_watcher.reset();
#endif
s_is_started = false;
if (_CoreParameter.bFastmem)