Don't need to hang dolphin when searching for wiimote with the refresh button.

This code is getting pretty ugly. :/
This commit is contained in:
Jordan Woyak 2013-02-14 19:04:34 -06:00
parent cda88a8c1e
commit 891de52769
1 changed files with 4 additions and 2 deletions

View File

@ -565,13 +565,15 @@ void Refresh()
g_wiimote_scanner.StopScanning();
{
std::lock_guard<std::recursive_mutex> lk(g_refresh_lock);
std::unique_lock<std::recursive_mutex> lk(g_refresh_lock);
std::vector<Wiimote*> found_wiimotes;
if (0 != CalculateWantedWiimotes())
{
// Don't hang dolphin when searching
lk.unlock();
found_wiimotes = g_wiimote_scanner.FindWiimotes();
lk.lock();
}
CheckForDisconnectedWiimotes();