This commit is contained in:
Fire Cube 2025-05-26 21:17:13 +02:00
parent f9bbde9c79
commit 10680c57f1

View File

@ -266,23 +266,16 @@ int PS4_SYSV_ABI sceKernelWaitEqueue(SceKernelEqueue eq, SceKernelEvent* ev, int
return ORBIS_KERNEL_ERROR_EINVAL;
}
// When the timeout is nullptr, we wait indefinitely
if (eq->HasSmallTimer()) {
ASSERT(timo && *timo);
*out = eq->WaitForSmallTimer(ev, num, *timo);
*out = eq->WaitForSmallTimer(ev, num, (timo != nullptr) ? *timo : 0);
} else {
if (timo == nullptr) { // wait until an event arrives without timing out
*out = eq->WaitForEvents(ev, num, 0);
}
if (timo != nullptr) {
if (*timo == 0) {
// Only events that have already arrived at the time of this function call can be
// received
if (*timo == 0) {
*out = eq->GetTriggeredEvents(ev, num);
} else {
// Wait until an event arrives with timing out
*out = eq->WaitForEvents(ev, num, *timo);
}
*out = eq->WaitForEvents(ev, num, (timo != nullptr) ? *timo : 0);
}
}