Merge f1ae85282c
into e7282f4244
This commit is contained in:
commit
f39ba24e19
|
@ -708,15 +708,19 @@ void WiimoteScanner::ThreadFunc()
|
||||||
g_controller_interface.PlatformPopulateDevices([] { ProcessWiimotePool(); });
|
g_controller_interface.PlatformPopulateDevices([] { ProcessWiimotePool(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_scan_mode.load() == WiimoteScanMode::DO_NOT_SCAN)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Stop scanning if not in continous mode.
|
||||||
|
auto scan_mode = WiimoteScanMode::SCAN_ONCE;
|
||||||
|
m_scan_mode.compare_exchange_strong(scan_mode, WiimoteScanMode::DO_NOT_SCAN);
|
||||||
|
|
||||||
// Does stuff needed to detect disconnects on Windows
|
// Does stuff needed to detect disconnects on Windows
|
||||||
for (const auto& backend : m_backends)
|
for (const auto& backend : m_backends)
|
||||||
backend->Update();
|
backend->Update();
|
||||||
|
|
||||||
CheckForDisconnectedWiimotes();
|
CheckForDisconnectedWiimotes();
|
||||||
|
|
||||||
if (m_scan_mode.load() == WiimoteScanMode::DO_NOT_SCAN)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// If we don't want Wiimotes in ControllerInterface, we may not need them at all.
|
// If we don't want Wiimotes in ControllerInterface, we may not need them at all.
|
||||||
if (!Config::Get(Config::MAIN_CONNECT_WIIMOTES_FOR_CONTROLLER_INTERFACE))
|
if (!Config::Get(Config::MAIN_CONNECT_WIIMOTES_FOR_CONTROLLER_INTERFACE))
|
||||||
{
|
{
|
||||||
|
@ -761,10 +765,6 @@ void WiimoteScanner::ThreadFunc()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop scanning if not in continous mode.
|
|
||||||
auto scan_mode = WiimoteScanMode::SCAN_ONCE;
|
|
||||||
m_scan_mode.compare_exchange_strong(scan_mode, WiimoteScanMode::DO_NOT_SCAN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue