fixed an issue where the CPU sometimes single-steps an extra time after pausing

This commit is contained in:
nitsuja 2012-01-02 01:29:16 -08:00
parent ced8ca7219
commit 81a1efab8e
2 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,13 @@ public:
is_set = false;
}
void Reset()
{
std::unique_lock<std::mutex> 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
{

View File

@ -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);
}