mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 11:35:45 +00:00
improved sceKernelWaitEqueue
This commit is contained in:
parent
67c1772771
commit
0b8baedab7
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue