From a3637a1caddcd88ffa23d28b77a276e9e2bed926 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 9 Sep 2013 20:51:52 -0700 Subject: [PATCH] Set the low mystery bits of the thread attr. Tests on PSP show this, and I can't find a way to not have them set. But I don't really know what they mean. Anyway, since you can refer the status, you can see them, may improve compatibility. --- Core/HLE/sceKernelThread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 9779f15c5a..ff5169bb60 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -1934,6 +1934,8 @@ Thread *__KernelCreateThread(SceUID &id, SceUID moduleId, const char *name, u32 t->nt.entrypoint = entryPoint; t->nt.nativeSize = sizeof(t->nt); t->nt.attr = attr; + // TODO: I have no idea what this value is but the PSP firmware seems to add it on create. + t->nt.attr |= 0xFF; t->nt.initialPriority = t->nt.currentPriority = priority; t->nt.stackSize = stacksize; t->nt.status = THREADSTATUS_DORMANT;