mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-31 08:51:29 -04:00
Fix JKRDecomp crash I caused
By changing more things :sloggers:
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user