From 891de527690a24a4e5c48ce04e85547905a694b9 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 14 Feb 2013 19:04:34 -0600 Subject: [PATCH] Don't need to hang dolphin when searching for wiimote with the refresh button. This code is getting pretty ugly. :/ --- Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp index 311bf11de2..b628cf61fc 100644 --- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp @@ -565,13 +565,15 @@ void Refresh() g_wiimote_scanner.StopScanning(); { - std::lock_guard lk(g_refresh_lock); - + std::unique_lock lk(g_refresh_lock); std::vector found_wiimotes; if (0 != CalculateWantedWiimotes()) { + // Don't hang dolphin when searching + lk.unlock(); found_wiimotes = g_wiimote_scanner.FindWiimotes(); + lk.lock(); } CheckForDisconnectedWiimotes();