mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2025-01-18 08:41:08 +00:00
do..while, sleep before first call to version()
This commit is contained in:
parent
06df144374
commit
7db10650fb
@ -10,7 +10,6 @@ long login(T_VBVMR_INTERFACE *iVMR, int kind)
|
||||
long v;
|
||||
|
||||
rep = iVMR->VBVMR_Login();
|
||||
Sleep(20);
|
||||
if (rep == 1)
|
||||
{
|
||||
run_voicemeeter(iVMR, kind);
|
||||
@ -34,12 +33,12 @@ long login(T_VBVMR_INTERFACE *iVMR, int kind)
|
||||
int timeout = 2;
|
||||
|
||||
endwait = time(NULL) + timeout;
|
||||
while (time(NULL) < endwait)
|
||||
do
|
||||
{
|
||||
Sleep(100);
|
||||
if ((rep = version(iVMR, &v)) == 0)
|
||||
break;
|
||||
Sleep(20);
|
||||
}
|
||||
} while (time(NULL) < endwait);
|
||||
}
|
||||
if (rep == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user