Game no longer crashes on Dolphin

This commit is contained in:
2026-03-09 08:05:26 -05:00
parent 23eaffa3a7
commit c5f5b025a6
39 changed files with 1227 additions and 160 deletions

View File

@@ -5,8 +5,9 @@
* https://opensource.org/licenses/MIT
*/
#include "dolphin.h"
#include "debug/debug.h"
#include "display/display.h"
#include <debug.h>
static char_t DEBUG_ERROR_BUFFER[16*1024] = {0};
@@ -14,6 +15,10 @@ void debugPrint(const char_t *message, ...) {
// append to error buffer
size_t start = strlen(DEBUG_ERROR_BUFFER);
va_list args;
va_start(args, message);
fprintf(stdout, message, args);
va_end(args);
va_start(args, message);
vsnprintf(
DEBUG_ERROR_BUFFER + start,
@@ -25,6 +30,8 @@ void debugPrint(const char_t *message, ...) {
}
void debugFlush() {
fflush(stdout);
// Either create graphics, or hijack the displays' graphics.
void *xfb = NULL;
GXRModeObj *rmode = NULL;