idk
This commit is contained in:
@@ -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)
|
||||
11
src/duskpsp/debug/CMakeLists.txt
Normal file
11
src/duskpsp/debug/CMakeLists.txt
Normal 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
23
src/duskpsp/debug/debug.c
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user