improved sceKernelWaitEqueue

This commit is contained in:
georgemoralis 2024-05-18 10:02:40 +03:00
parent 67c1772771
commit 0b8baedab7
1 changed files with 6 additions and 2 deletions

View File

@ -64,13 +64,17 @@ int PS4_SYSV_ABI sceKernelWaitEqueue(SceKernelEqueue eq, SceKernelEvent* ev, int
if (timo != nullptr) {
// Only events that have already arrived at the time of this function call can be received
if (*timo == 0) {
UNREACHABLE();
*out = eq->getTriggeredEvents(ev, num);
} else {
// Wait until an event arrives with timing out
UNREACHABLE();
*out = eq->waitForEvents(ev, num, *timo);
}
}
if (*out == 0) {
return ORBIS_KERNEL_ERROR_ETIMEDOUT;
}
return ORBIS_OK;
}