Merge pull request #4002 from leoetlino/wiimote-windows

WiimoteReal: Call Update() less often
This commit is contained in:
Pierre Bourdon 2016-07-12 17:57:32 +02:00 committed by GitHub
commit 12d650be99
1 changed files with 4 additions and 1 deletions

View File

@ -472,7 +472,6 @@ void WiimoteScanner::ThreadFunc()
{
m_scan_mode_changed_event.WaitFor(std::chrono::milliseconds(500));
Update(); // Does stuff needed to detect disconnects on Windows
CheckForDisconnectedWiimotes();
if (m_scan_mode.load() == WiimoteScanMode::DO_NOT_SCAN)
@ -490,6 +489,10 @@ void WiimoteScanner::ThreadFunc()
TryToConnectBalanceBoard(found_board);
}
}
else
{
Update(); // Does stuff needed to detect disconnects on Windows
}
if (m_scan_mode.load() == WiimoteScanMode::SCAN_ONCE)
m_scan_mode.store(WiimoteScanMode::DO_NOT_SCAN);