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:
Ryan Hitchman 2015-01-09 22:28:46 -08:00
parent c1b391d08b
commit 09f71b25b4
1 changed files with 7 additions and 0 deletions

View File

@ -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)