Merge pull request #295 from TwilitRealm/26-04-09-jkrdecomp

Fix JKRDecomp crash I caused
This commit is contained in:
TakaRikka
2026-04-09 14:26:15 -07:00
committed by GitHub
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();
}