VERY experimental Nintendo Switch 2 emulator
C++
hle: kernel: KThread: Release thread resource on thread exit.
bunneid09ade6cab7c
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cppindex 45ad589d9b..aa100e1390 100644--- a/src/core/hle/kernel/k_thread.cpp+++ b/src/core/hle/kernel/k_thread.cpp@@ -247,6 +247,7 @@ void KThread::Finalize() {// Decrement the parent process's thread count.if (parent != nullptr) {parent->DecrementThreadCount();+ parent->GetResourceLimit()->Release(ResourceType::Threads, 1);}}