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:
parent
cda88a8c1e
commit
891de52769
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue