This commit is contained in:
2026-03-06 16:34:45 -06:00
parent 9139c4350a
commit 93074d653e
27 changed files with 122 additions and 61 deletions

View File

@@ -0,0 +1,13 @@
# Copyright (c) 2026 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Includes
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
# Subdirs
add_subdirectory(debug)

View File

@@ -0,0 +1,11 @@
# Copyright (c) 2026 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
debug.c
)

23
src/duskpsp/debug/debug.c Normal file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "psp.h"
void debugPrint(const char_t *message, ...) {
FILE *file = fopen("ms0:/PSP/GAME/Dusk/debug.log", "a");
if(!file) return;
va_list args;
va_start(args, message);
vfprintf(file, message, args);
va_end(args);
fclose(file);
}
void debugFlush() {
fflush(stdout);
}