mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fix a hang in linux with the wiimote new plugin caused by a critical section not being exited. Also removed the original wiiuse_find function and replaced it with my wiiuse_find_more function with a little tweak to speed up wiimote discovery.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6007 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -389,6 +389,7 @@ void Refresh() // this gets called from the GUI thread
|
||||
// make sure real wiimotes have been initialized
|
||||
if (!g_real_wiimotes_initialized)
|
||||
{
|
||||
g_refresh_critsec.Leave();
|
||||
Initialize();
|
||||
return;
|
||||
}
|
||||
@ -401,10 +402,13 @@ void Refresh() // this gets called from the GUI thread
|
||||
|
||||
// don't scan for wiimotes if we don't want any more
|
||||
if (wanted_wiimotes <= g_wiimotes_found)
|
||||
{
|
||||
g_refresh_critsec.Leave();
|
||||
return;
|
||||
}
|
||||
|
||||
// scan for wiimotes
|
||||
unsigned int num_wiimotes = wiiuse_find_more(g_wiimotes_from_wiiuse, wanted_wiimotes, 5);
|
||||
unsigned int num_wiimotes = wiiuse_find(g_wiimotes_from_wiiuse, wanted_wiimotes, 5);
|
||||
|
||||
DEBUG_LOG(WIIMOTE, "Found %i Real Wiimotes, %i wanted", num_wiimotes, wanted_wiimotes);
|
||||
|
||||
|
Reference in New Issue
Block a user