summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-06-13 13:35:29 -0600
committerGitHub <noreply@github.com>2024-06-13 13:35:29 -0600
commit0d629e466a75a3e7c8ab9ee8ea88bd4c52023a29 (patch)
tree1f832aad7b4f32558b19545f53092bb45b11fb93 /src/main.c
parentb594f112e05c46fa4f8da2e4be74ba1a28ee50b4 (diff)
Take7 (#17)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 711d045ad..491034fe4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -39,6 +39,7 @@
#include <debug.h>
#include "crash_screen.h"
#include "buffers/gfx_output_buffer.h"
+#include <bridge/gfxdebuggerbridge.h>
// Declarations (not in this file)
void func_80091B78(void);
@@ -301,7 +302,9 @@ void create_gfx_task_structure(void) {
func_8008C214();
// gGfxSPTask->task.t.yield_data_ptr = (u64 *) &gGfxSPTaskYieldBuffer;
// gGfxSPTask->task.t.yield_data_size = OS_YIELD_DATA_SIZE;
-
+ if (GfxDebuggerIsDebuggingRequested()) {
+ GfxDebuggerDebugDisplayList(gGfxPool->gfxPool);
+ }
Graphics_PushFrame(gGfxPool->gfxPool);
}
@@ -1174,11 +1177,6 @@ void update_gamestate(void) {
}
void thread5_game_loop(void) {
-
- // if (GfxDebuggerIsDebugging()) {
- // Graphics_PushFrame(gGfxPool->gfxPool);
- // return;
- // }
setup_game_memory();
osCreateMesgQueue(&gGfxVblankQueue, gGfxMesgBuf, 1);
osCreateMesgQueue(&gGameVblankQueue, &gGameMesgBuf, 1);
@@ -1204,6 +1202,10 @@ void thread5_game_loop(void) {
void thread5_iteration(void){
// func_800CB2C4();
+ if (GfxDebuggerIsDebugging()) {
+ Graphics_PushFrame(gGfxPool->gfxPool);
+ return;
+ }
// Update the gamestate if it has changed (racing, menus, credits, etc.).
if (gGamestateNext != gGamestate) {
gGamestate = gGamestateNext;