Minor correctness on create mutex.

This commit is contained in:
Unknown W. Brackets committed 2012-11-20 02:20:12 -08:00
1 parent 7fa388952e
commit 7b9a8bf766
1 file changed
+7 -1
+7 -1
View File
@@ -93,7 +93,13 @@ void sceKernelCreateMutex(const char *name, u32 attr, int initialCount, u32 opti
mutex->nm.name[31] = 0;
mutex->nm.attr = attr;
mutex->nm.lockLevel = initialCount;
mutex->nm.lockThread = __KernelGetCurThread();
if (mutex->nm.lockLevel == 0)
mutex->nm.lockThread = -1;
else
mutex->nm.lockThread = __KernelGetCurThread();
if (optionsPtr != 0)
WARN_LOG(HLE,"sceKernelCreateMutex(%s) unsupported options parameter.", name);
RETURN(id);