Game no longer crashes on Dolphin

This commit is contained in:
2026-03-09 08:05:26 -05:00
parent 23eaffa3a7
commit c5f5b025a6
39 changed files with 1227 additions and 160 deletions

View File

@@ -12,7 +12,6 @@ target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
# Sources
target_sources(${DUSK_BINARY_TARGET_NAME}
PUBLIC
# hello.c
)
# Subdirs

View File

@@ -1,41 +0,0 @@
#include <pspuser.h>
#include <pspdebug.h>
#include <pspdisplay.h>
// PSP_MODULE_INFO is required
PSP_MODULE_INFO("Hello World", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
int callback_thread(SceSize args, void *argp) {
int cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
int setup_callbacks(void) {
int thid = sceKernelCreateThread("update_thread", callback_thread, 0x11, 0xFA0, 0, 0);
if(thid >= 0)
sceKernelStartThread(thid, 0, 0);
return thid;
}
int main(void) {
// Use above functions to make exiting possible
setup_callbacks();
// Print Hello World! on a debug screen on a loop
pspDebugScreenInit();
while(1) {
pspDebugScreenSetXY(0, 0);
pspDebugScreenPrintf("Hello World!");
sceDisplayWaitVblankStart();
}
return 0;
}