Skip to content

Commit

Permalink
Merge pull request #2640 from AdmiralCurtiss/real-wiimote-crash-fix
Browse files Browse the repository at this point in the history
WiimoteReal: Fix crash when switching a real Wiimote to a different slot or type during emulation.
  • Loading branch information
CrossVR committed Jun 26, 2015
2 parents 6818f2e + 716c542 commit cff6d9f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -485,9 +485,12 @@ void WiimoteScanner::ThreadFunc()

bool Wiimote::Connect()
{
m_thread_ready.store(false);
StartThread();
WaitReady();
if (!m_run_thread.load())
{
m_thread_ready.store(false);
StartThread();
WaitReady();
}
return IsConnected();
}

Expand Down

0 comments on commit cff6d9f

Please sign in to comment.