Fix PSP compiled

This commit is contained in:
2025-11-09 20:42:03 -06:00
parent f23e26d9da
commit d6c497731f
10 changed files with 48 additions and 34 deletions

View File

@@ -8,28 +8,6 @@
#include "debug.h"
void debugPrint(const char_t *message, ...) {
// char_t buffer[CONSOLE_LINE_MAX];
// va_list args;
// va_start(args, message);
// int32_t len = stringFormatVA(buffer, CONSOLE_LINE_MAX, message, args);
// va_end(args);
// // Move all lines back
// memoryMove(
// CONSOLE.line[0],
// CONSOLE.line[1],
// (CONSOLE_HISTORY_MAX - 1) * CONSOLE_LINE_MAX
// );
// // Copy the new line
// memoryCopy(
// CONSOLE.line[CONSOLE_HISTORY_MAX - 1],
// buffer,
// len + 1
// );
// printf("%s\n", buffer);
va_list args;
va_start(args, message);
vprintf(message, args);
@@ -37,4 +15,14 @@ void debugPrint(const char_t *message, ...) {
// For the time being just use standard printing functions.
printf(message, args);
#if PSP
FILE *file = fopen("ms0:/PSP/GAME/Dusk/debug.log", "a");
if(file) {
va_start(args, message);
vfprintf(file, message, args);
va_end(args);
fclose(file);
}
#endif
}