From 5fe537cac6f388873e4f44e6402fa2abb8c4f3c4 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 5 Jun 2013 23:52:24 -0700 Subject: [PATCH] sceKernelChangeThreadPriority() can't do dormant. --- Core/HLE/sceKernelThread.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index b57ed41ad1..4ded54568c 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -2276,6 +2276,12 @@ int sceKernelChangeThreadPriority(SceUID threadID, int priority) Thread *thread = kernelObjects.Get(threadID, error); if (thread) { + if (thread->isStopped()) + { + ERROR_LOG_REPORT(HLE, "sceKernelChangeThreadPriority(%i, %i): thread is dormant", threadID, priority); + return SCE_KERNEL_ERROR_DORMANT; + } + if (priority < 0x08 || priority > 0x77) { ERROR_LOG_REPORT(HLE, "sceKernelChangeThreadPriority(%i, %i): bogus priority", threadID, priority);