Fixed build

This commit is contained in:
2026-04-20 15:43:18 -05:00
parent b640295be2
commit 1646dc2dbd
9 changed files with 35 additions and 37 deletions
+15 -15
View File
@@ -53,21 +53,21 @@ jobs:
path: ./git-artifcats/Dusk
if-no-files-found: error
build-vita:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker
uses: docker/setup-docker-action@v5
- name: Build Vita
run: ./scripts/build-vita-docker.sh
- name: Upload Vita binary
uses: actions/upload-artifact@v6
with:
name: dusk-vita
path: build-vita/Dusk.vpk
if-no-files-found: error
# build-vita:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v6
# - name: Set up Docker
# uses: docker/setup-docker-action@v5
# - name: Build Vita
# run: ./scripts/build-vita-docker.sh
# - name: Upload Vita binary
# uses: actions/upload-artifact@v6
# with:
# name: dusk-vita
# path: build-vita/Dusk.vpk
# if-no-files-found: error
build-knulli:
runs-on: ubuntu-latest
+1
View File
@@ -4,6 +4,7 @@ target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_INPUT_GAMEPAD
DUSK_DISPLAY_WIDTH=640
DUSK_DISPLAY_HEIGHT=480
DUSK_THREAD_PTHREAD
)
# Custom compiler flags
+1 -1
View File
@@ -42,5 +42,5 @@ target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_INPUT_GAMEPAD
DUSK_TIME_DYNAMIC
DUSK_NETWORK_IPV6
THREAD_PTHREAD=1
DUSK_THREAD_PTHREAD
)
+1 -1
View File
@@ -44,7 +44,7 @@ target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
DUSK_OPENGL_LEGACY
DUSK_DISPLAY_WIDTH=480
DUSK_DISPLAY_HEIGHT=272
THREAD_PTHREAD=1
DUSK_THREAD_PTHREAD
)
# Postbuild, create .pbp file for PSP.
+3 -3
View File
@@ -18,7 +18,7 @@ void threadInit(thread_t *thread, const threadcallback_t callback) {
thread->state = THREAD_STATE_STOPPED;
thread->callback = callback;
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
thread->threadId = 0;
#endif
}
@@ -30,7 +30,7 @@ void threadStartRequest(thread_t *thread) {
thread->state = THREAD_STATE_STARTING;
threadMutexUnlock(&thread->stateMutex);
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
assertTrue(thread->threadId == 0, "Thread id not 0.");
pthread_create(
@@ -93,7 +93,7 @@ bool_t threadShouldStop(thread_t *thread) {
return state;
}
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
void * threadHandler(thread_t *thread) {
assertNotNull(thread, "Thread cannot be NULL.");
+2 -8
View File
@@ -8,12 +8,6 @@
#pragma once
#include "thread/threadmutex.h"
#if THREAD_PTHREAD
#include <pthread.h>
#else
#error "At least one threading implementation must be defined."
#endif
typedef struct thread_s thread_t;
typedef void (*threadcallback_t)(thread_t *thread);
@@ -40,7 +34,7 @@ typedef struct thread_s {
threadcallback_t callback;
void *data;
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_t threadId;
#endif
} thread_t;
@@ -93,7 +87,7 @@ void threadStop(thread_t *thread);
*/
bool_t threadShouldStop(thread_t *thread);
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
/**
* Handles the thread's lifecycle for pthreads.
* @param thread Pointer to the thread structure to handle.
+7 -7
View File
@@ -8,43 +8,43 @@
#include "threadmutex.h"
void threadMutexInit(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_mutex_init(&lock->mutex, NULL);
#endif
}
void threadMutexLock(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_mutex_lock(&lock->mutex);
#endif
}
bool_t threadMutexTryLock(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
return pthread_mutex_trylock(&lock->mutex) == 0;
#endif
}
void threadMutexUnlock(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_mutex_unlock(&lock->mutex);
#endif
}
void threadMutexWaitLock(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_cond_wait(&lock->cond, &lock->mutex);
#endif
}
void threadMutexSignal(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_cond_signal(&lock->cond);
#endif
}
void threadMutexDispose(threadmutex_t *lock) {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_mutex_destroy(&lock->mutex);
#endif
}
+2 -2
View File
@@ -8,14 +8,14 @@
#pragma once
#include "dusk.h"
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
#include <pthread.h>
#else
#error "At least one threading implementation must be defined."
#endif
typedef struct threadlock_t {
#if THREAD_PTHREAD
#ifdef DUSK_THREAD_PTHREAD
pthread_mutex_t mutex;
pthread_cond_t cond;
#endif
+3
View File
@@ -6,10 +6,13 @@
*/
#pragma once
#include <ogcsys.h>
#include <gccore.h>
#include <malloc.h>
#define consoleInit consoleInitDolhpin
#ifdef DUSK_GAMECUBE
#define CONF_ASPECT_4_3 0
#define CONF_ASPECT_16_9 1