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; return ORBIS_KERNEL_ERROR_EINVAL;
} }
// When the timeout is nullptr, we wait indefinitely
if (eq->HasSmallTimer()) { if (eq->HasSmallTimer()) {
ASSERT(timo && *timo); *out = eq->WaitForSmallTimer(ev, num, (timo != nullptr) ? *timo : 0);
*out = eq->WaitForSmallTimer(ev, num, *timo);
} else { } else {
if (timo == nullptr) { // wait until an event arrives without timing out if (*timo == 0) {
*out = eq->WaitForEvents(ev, num, 0);
}
if (timo != nullptr) {
// Only events that have already arrived at the time of this function call can be // Only events that have already arrived at the time of this function call can be
// received // received
if (*timo == 0) { *out = eq->GetTriggeredEvents(ev, num);
*out = eq->GetTriggeredEvents(ev, num); } else {
} else { *out = eq->WaitForEvents(ev, num, (timo != nullptr) ? *timo : 0);
// Wait until an event arrives with timing out
*out = eq->WaitForEvents(ev, num, *timo);
}
} }
} }