mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-26 23:26:45 -04:00
Merge branch 'main' of https://github.com/TakaRikka/dusk
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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