This commit is contained in:
madeline
2026-04-09 14:44:59 -07:00
4 changed files with 18 additions and 2 deletions
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
print("You do not need to run configure.py for Dusk! This file is here to avoid conflicts with decomp.")
print("Use CMake to configure your build instead.")
exit(1)
###
# Generates build files for the project.
# This file also includes the project configuration,
@@ -5,6 +5,7 @@
#include <gx.h>
#include <stdint.h>
#include <vi.h>
#include "SDL3/SDL_timer.h"
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/JFramework/JFWDisplay.h"
#include "JSystem/JKernel/JKRHeap.h"
@@ -384,6 +385,12 @@ static void waitForTick(u32 p1, u16 p2) {
JSUList<JFWAlarm> JFWAlarm::sList(false);
#if TARGET_PC
void JFWDisplay::threadSleep(s64 time) {
SDL_DelayNS(OSTicksToMicroseconds(time) * 1'000);
}
#else
static void JFWThreadAlarmHandler(OSAlarm* p_alarm, OSContext* p_ctx) {
JFWAlarm* alarm = static_cast<JFWAlarm*>(p_alarm);
alarm->removeLink();
@@ -401,6 +408,7 @@ void JFWDisplay::threadSleep(s64 time) {
OSSuspendThread(alarm.getThread());
OSRestoreInterrupts(status);
}
#endif
static void dummy() {
JUTXfb::getManager()->setDisplayingXfbIndex(0);
+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();
}