Fix JKRDecomp crash I caused

By changing more things :sloggers:
This commit is contained in:
PJB3005
2026-04-08 13:30:50 +02:00
parent 4ed0909085
commit 9d3877e448
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -88,7 +88,11 @@ void JKRThread::setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param
mThreadRecord = (OSThread*)JKRAllocFromHeap(mHeap, sizeof(OSThread), 0x20);
JUT_ASSERT(168, mThreadRecord);
OSCreateThread(mThreadRecord, start, this, (u8*)mStackMemory + mStackSize, mStackSize, param_3, 1);
#if TARGET_PC
OSCreateThread(mThreadRecord, start, this, (u8*)mStackMemory + mStackSize, mStackSize, param_3, 0);
#else
OSCreateThread(mThreadRecord, start, this, (u8*)mStackMemory + mStackSize, mStackSize, param_3, OS_THREAD_ATTR_DETACH);
#endif
}
void* JKRThread::start(void* thread) {
+1 -1
View File
@@ -41,7 +41,7 @@ struct PCThreadData {
bool suspended = false;
~PCThreadData() {
if (dusk::IsShuttingDown) {
if (dusk::IsShuttingDown && nativeThread.joinable()) {
// Don't care about threads if we're shutting down.
nativeThread.detach();
}