mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
fix wrong nullptr check
This commit is contained in:
parent
54839ed589
commit
45da348676
@ -269,14 +269,19 @@ int PS4_SYSV_ABI sceKernelWaitEqueue(SceKernelEqueue eq, SceKernelEvent* ev, int
|
|||||||
|
|
||||||
// When the timeout is nullptr, we wait indefinitely
|
// When the timeout is nullptr, we wait indefinitely
|
||||||
if (eq->HasSmallTimer()) {
|
if (eq->HasSmallTimer()) {
|
||||||
*out = eq->WaitForSmallTimer(ev, num, (timo != nullptr) ? *timo : 0);
|
if (timo == nullptr) {
|
||||||
|
*out = eq->WaitForSmallTimer(ev, num, 0);
|
||||||
|
} else {
|
||||||
|
ASSERT(*timo);
|
||||||
|
*out = eq->WaitForSmallTimer(ev, num, *timo);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (*timo == 0) {
|
if (timo == nullptr) {
|
||||||
// Only events that have already arrived at the time of this function call can be
|
*out = eq->WaitForEvents(ev, num, 0);
|
||||||
// received
|
} else if (*timo == 0) {
|
||||||
*out = eq->GetTriggeredEvents(ev, num);
|
*out = eq->GetTriggeredEvents(ev, num);
|
||||||
} else {
|
} else {
|
||||||
*out = eq->WaitForEvents(ev, num, (timo != nullptr) ? *timo : 0);
|
*out = eq->WaitForEvents(ev, num, *timo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user