mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 23:29:44 -06:00
Properly handle g_wiimotes_mutex again for reconnect on button press for real wiimotes
Sorry, i overlooked the mutex in PR https://github.com/dolphin-emu/dolphin/pull/4949 This pr fixes issue 10434: https://bugs.dolphin-emu.org/issues/10434
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user