WiimoteReal: retry failed connections quickly
Retry a failed connection after a short delay -- hardware sometimes needs some time to settle, or other Bluetooth programs are attempting to query the device as well (e.g. blueman-manager).
This commit is contained in:
parent
c1b391d08b
commit
09f71b25b4
|
@ -530,6 +530,13 @@ void Wiimote::ThreadFunc()
|
|||
|
||||
bool ok = ConnectInternal();
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
// try again, it might take a moment to settle
|
||||
Common::SleepCurrentThread(100);
|
||||
ok = ConnectInternal();
|
||||
}
|
||||
|
||||
SetReady();
|
||||
|
||||
if (!ok)
|
||||
|
|
Loading…
Reference in New Issue