mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Increment wakeupCount when a thread is pending.
It might've been woken up but just not run yet. That doesn't mean it should not have wakeupCount incremented. Fixes Tales of Eternia freezing before world map.
This commit is contained in:
parent
d586d7ddd2
commit
0ad9658eb2
1 changed files with 3 additions and 2 deletions
|
@ -2238,11 +2238,12 @@ void sceKernelWakeupThread()
|
|||
Thread *t = kernelObjects.Get<Thread>(uid, error);
|
||||
if (t)
|
||||
{
|
||||
if (t->nt.waitType != WAITTYPE_SLEEP) {
|
||||
if (!t->isWaitingFor(WAITTYPE_SLEEP, 1)) {
|
||||
t->nt.wakeupCount++;
|
||||
DEBUG_LOG(HLE,"sceKernelWakeupThread(%i) - wakeupCount incremented to %i", uid, t->nt.wakeupCount);
|
||||
RETURN(0);
|
||||
} else {
|
||||
VERBOSE_LOG(HLE,"sceKernelWakeupThread(%i) - woke thread at %i", uid, t->nt.wakeupCount);
|
||||
__KernelResumeThreadFromWait(uid);
|
||||
}
|
||||
}
|
||||
|
@ -2286,7 +2287,7 @@ static void __KernelSleepThread(bool doCallbacks) {
|
|||
} else {
|
||||
VERBOSE_LOG(HLE, "sceKernelSleepThread()");
|
||||
RETURN(0);
|
||||
__KernelWaitCurThread(WAITTYPE_SLEEP, 0, 0, 0, doCallbacks, "thread slept");
|
||||
__KernelWaitCurThread(WAITTYPE_SLEEP, 1, 0, 0, doCallbacks, "thread slept");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue