Fix PSP compiled
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user