diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h index ba713ed64c..e711fcab5c 100644 --- a/Source/Core/Common/Src/Thread.h +++ b/Source/Core/Common/Src/Thread.h @@ -72,6 +72,13 @@ public: is_set = false; } + void Reset() + { + std::unique_lock lk(m_mutex); + // no other action required, since wait loops on the predicate and any lingering signal will get cleared on the first iteration + is_set = false; + } + private: class IsSet { diff --git a/Source/Core/Core/Src/HW/CPU.cpp b/Source/Core/Core/Src/HW/CPU.cpp index 69b5055c9f..0f461b0fc5 100644 --- a/Source/Core/Core/Src/HW/CPU.cpp +++ b/Source/Core/Core/Src/HW/CPU.cpp @@ -115,6 +115,7 @@ void CCPU::EnableStepping(const bool _bStepping) if (_bStepping) { PowerPC::Pause(); + m_StepEvent.Reset(); g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PAUSE); DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(true); }