mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Merge pull request #5873 from mimimi085181/fix-real-wiimote
Properly handle g_wiimotes_mutex again for real wiimotes
This commit is contained in:
commit
6a76ca7bb7
@ -892,11 +892,13 @@ bool CheckForButtonPress(int wiimote_number)
|
|||||||
if (!g_wiimotes_mutex.try_lock())
|
if (!g_wiimotes_mutex.try_lock())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
bool button_pressed = false;
|
||||||
|
|
||||||
if (g_wiimotes[wiimote_number])
|
if (g_wiimotes[wiimote_number])
|
||||||
return g_wiimotes[wiimote_number]->CheckForButtonPress();
|
button_pressed = g_wiimotes[wiimote_number]->CheckForButtonPress();
|
||||||
|
|
||||||
g_wiimotes_mutex.unlock();
|
g_wiimotes_mutex.unlock();
|
||||||
return false;
|
return button_pressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsValidDeviceName(const std::string& name)
|
bool IsValidDeviceName(const std::string& name)
|
||||||
|
Loading…
Reference in New Issue
Block a user