[+] Added missing poll condition trigger count
[*] 1/2th of the WaitAll dummy correction (should work_
This commit is contained in:
parent
2bfa4b0100
commit
b9414f09d6
@ -611,22 +611,18 @@ namespace Aurora::Loop
|
||||
auto timeDelta = endTime - startTime; // TODO: cap to last obj
|
||||
|
||||
DWORD status {};
|
||||
if (this->bIsWinLoop_)
|
||||
{
|
||||
|
||||
do
|
||||
{
|
||||
if (this->bIsWinLoop_)
|
||||
{
|
||||
status = ::MsgWaitForMultipleObjectsEx(next, this->handleArrayAnd_.data() + index, timeDelta, QS_ALLPOSTMESSAGE | QS_ALLINPUT | QS_ALLEVENTS, MWMO_INPUTAVAILABLE | MWMO_ALERTABLE | MWMO_WAITALL);
|
||||
}
|
||||
while (status == WAIT_IO_COMPLETION);
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
status = ::WaitForMultipleObjectsEx(next, this->handleArrayAnd_.data() + index, true, timeDelta, true);
|
||||
}
|
||||
while (status == WAIT_IO_COMPLETION);
|
||||
}
|
||||
} while (status == WAIT_IO_COMPLETION);
|
||||
|
||||
if (status == WAIT_OBJECT_0 + next)
|
||||
{
|
||||
@ -677,6 +673,13 @@ namespace Aurora::Loop
|
||||
bReturnStatus |= true;
|
||||
}
|
||||
|
||||
if (this->handleArrayOr_[queueIterator.startingIndexOr] == AuReinterpretCast<HANDLE>(this->hDummy_))
|
||||
{
|
||||
auto handle = AuReinterpretCast<HANDLE>(source.source->Singular() ? source.source->GetHandle() : source.source->GetHandles()[0]);
|
||||
this->handleArrayAnd_[queueIterator.startingIndexAnd] = handle;
|
||||
this->handleArrayOr_[queueIterator.startingIndexOr] = handle;
|
||||
}
|
||||
|
||||
if (bShouldRemove)
|
||||
{
|
||||
|
||||
@ -915,22 +918,17 @@ namespace Aurora::Loop
|
||||
sleepDelta = 0;
|
||||
}
|
||||
|
||||
if (this->bIsWinLoop_)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (this->bIsWinLoop_)
|
||||
{
|
||||
temp = ::MsgWaitForMultipleObjectsEx(this->handleArrayOr_.size(), this->handleArrayOr_.data(), sleepDelta, QS_ALLPOSTMESSAGE | QS_ALLINPUT | QS_ALLEVENTS, MWMO_INPUTAVAILABLE | MWMO_ALERTABLE);
|
||||
}
|
||||
while (status == WAIT_IO_COMPLETION);
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
temp = ::WaitForMultipleObjectsEx(this->handleArrayOr_.size(), this->handleArrayOr_.data(), false, sleepDelta, true);
|
||||
}
|
||||
while (status == WAIT_IO_COMPLETION);
|
||||
}
|
||||
} while (temp == WAIT_IO_COMPLETION);
|
||||
|
||||
status = WaitToRetStatus(temp);
|
||||
|
||||
@ -1016,6 +1014,10 @@ namespace Aurora::Loop
|
||||
this->handleArrayOr_[queueIterator.startingIndexOr ] = reinterpret_cast<HANDLE>(this->hDummy_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
triggeredCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!poll)
|
||||
|
Loading…
Reference in New Issue
Block a user