mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-31 09:33:06 +00:00
WiimoteReal: Make sure that Wiimote thread isn't already running before starting it.
This fixes a crash when switching a Wiimote's internal slot or type in the Dolphin config.
This commit is contained in:
parent
a702c4e01e
commit
716c54217a
@ -485,9 +485,12 @@ void WiimoteScanner::ThreadFunc()
|
|||||||
|
|
||||||
bool Wiimote::Connect()
|
bool Wiimote::Connect()
|
||||||
{
|
{
|
||||||
m_thread_ready.store(false);
|
if (!m_run_thread.load())
|
||||||
StartThread();
|
{
|
||||||
WaitReady();
|
m_thread_ready.store(false);
|
||||||
|
StartThread();
|
||||||
|
WaitReady();
|
||||||
|
}
|
||||||
return IsConnected();
|
return IsConnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user