Add accidentally omitted code in last commit.

(m_wiimote_thread_run_loop was being used but not set, causing
Wiimote::IOWakeup to crash on OS X; todo rebase this)
This commit is contained in:
comex 2013-09-04 04:39:18 -04:00
parent 02fc68ea5d
commit 872e9ce3da

View file

@ -510,6 +510,10 @@ void Wiimote::StopThread()
{
if (m_wiimote_thread.joinable())
m_wiimote_thread.join();
#if defined(__APPLE__)
CFRelease(m_wiimote_thread_run_loop);
m_wiimote_thread_run_loop = NULL;
#endif
}
void Wiimote::SetReady()
@ -536,6 +540,10 @@ void Wiimote::WaitReady()
void Wiimote::ThreadFunc()
{
Common::SetCurrentThreadName("Wiimote Device Thread");
#if defined(__APPLE__)
m_wiimote_thread_run_loop = (CFRunLoopRef) CFRetain(CFRunLoopGetCurrent());
#endif
bool ok = ConnectInternal();
SetReady();