mirror of
https://github.com/open-goal/jak-project
synced 2026-08-22 07:04:29 -04:00
Change important printfs to lg::print (#3355)
This allows them to be logged into a file, useful for debugging. With this, GOAL `format` and C-kernel `Msg` (and its variants) will be logged.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "common/cross_os_debug/xdbg.h"
|
||||
#include "common/listener_common.h"
|
||||
#include "common/log/log.h"
|
||||
|
||||
#include "game/kernel/common/Ptr.h"
|
||||
#include "game/kernel/common/fileio.h"
|
||||
@@ -186,37 +187,37 @@ void cprintf(const char* format, ...) {
|
||||
/*!
|
||||
* Print directly to the C stdout
|
||||
* The "k" parameter is ignored, so this is just like printf
|
||||
* DONE, EXACT
|
||||
* DONE, changed vprintf to lg::printstd
|
||||
*/
|
||||
void Msg(s32 k, const char* format, ...) {
|
||||
(void)k;
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
lg::printstd(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Print directly to the C stdout
|
||||
* This is idential to Msg
|
||||
* DONE, EXACT
|
||||
* DONE, changed vprintf to lg::printstd
|
||||
*/
|
||||
void MsgWarn(const char* format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
lg::printstd(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Print directly to the C stdout
|
||||
* This is idential to Msg
|
||||
* DONE, EXACT
|
||||
* DONE, changed vprintf to lg::printstd
|
||||
*/
|
||||
void MsgErr(const char* format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
lg::printstd(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -572,4 +573,4 @@ char* kitoa(char* buffer, s64 value, u64 base, s32 length, char pad, u32 flag) {
|
||||
*/
|
||||
void kqtoa() {
|
||||
ASSERT(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user