Minor fixes to RAssertDolphin

This commit is contained in:
Phillip Stephens 2022-12-05 20:30:11 -08:00
parent 9e26e29035
commit 2c672dbfb1
1 changed files with 14 additions and 14 deletions

View File

@ -12,19 +12,7 @@
static const char* buildTime = "Build v1.088 10/29/2002 2:21:25"; static const char* buildTime = "Build v1.088 10/29/2002 2:21:25";
static char rs_debugger_buffer[1024]; static char rs_debugger_buffer[1024];
static int rs_debugger_buffer_size; static int rs_debugger_buffer_size;
static char DAT_805a9248; static bool DAT_805a9248;
void rs_debugger_printf(const char* format, ...) {
va_list arg;
va_start(arg, format);
rs_debugger_buffer_size = vsprintf(rs_debugger_buffer, format, arg);
va_end(arg);
OSContext context;
OSSaveContext(&context);
ErrorHandler(0xff, &context, 0, 0xd1dd0d1e);
}
void ErrorHandler(OSError code, OSContext* context, int arg1, int arg2) { void ErrorHandler(OSError code, OSContext* context, int arg1, int arg2) {
uint loopExitCriteria; uint loopExitCriteria;
@ -114,7 +102,7 @@ void ErrorHandler(OSError code, OSContext* context, int arg1, int arg2) {
"(read from DAR)\n", "(read from DAR)\n",
context->srr0, arg2); context->srr0, arg2);
if (DAT_805a9248 == '\0') { if (!DAT_805a9248) {
GXColor fg; // = &DAT_80000000; GXColor fg; // = &DAT_80000000;
GXColor bg; // = 0xffffff00; GXColor bg; // = 0xffffff00;
OSFatal(fg, bg, rs_debugger_buffer); OSFatal(fg, bg, rs_debugger_buffer);
@ -128,3 +116,15 @@ void SetErrorHandlers() {
OSSetErrorHandler(5, (OSErrorHandler*)ErrorHandler); OSSetErrorHandler(5, (OSErrorHandler*)ErrorHandler);
OSSetErrorHandler(15, (OSErrorHandler*)ErrorHandler); OSSetErrorHandler(15, (OSErrorHandler*)ErrorHandler);
} }
void rs_debugger_printf(const char* format, ...) {
va_list arg;
va_start(arg, format);
rs_debugger_buffer_size = vsprintf(rs_debugger_buffer, format, arg);
va_end(arg);
OSContext context;
OSSaveContext(&context);
ErrorHandler(0xff, &context, 0, 0xd1dd0d1e);
}