Fix screen blanking (#627)

* Update main.c

* Update skybox_and_splitscreen.c

* Adjust framebuffer handling in race_logic_loop

Reorder framebuffer clearing and creation for proper rendering.
This commit is contained in:
MegaMech
2026-01-17 22:35:21 -07:00
committed by GitHub
parent 61a2f1c5e8
commit a2036f5ce7
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -469,7 +469,7 @@ void* clear_framebuffer(s32 color) {
gDPSetCycleType(gDisplayListHead++, G_CYC_FILL);
gDPSetFillColor(gDisplayListHead++, color);
gDPFillRectangle(gDisplayListHead++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPFillWideRectangle(gDisplayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetGameRenderWidth(), SCREEN_HEIGHT);
gDPPipeSync(gDisplayListHead++);
@@ -1172,8 +1172,9 @@ void thread5_iteration(void) {
}
profiler_log_thread5_time(THREAD5_START);
config_gfx_pool();
FB_CreateFramebuffers();
read_controllers();
FB_CreateFramebuffers();
clear_framebuffer(0); // Clear the framebuffer
game_state_handler();
// call_render_hook();
+1 -1
View File
@@ -280,7 +280,7 @@ void select_framebuffer(void) {
GPACK_RGBA5551(D_800DC5D0, D_800DC5D4, D_800DC5D8, 1));
gDPPipeSync(gDisplayListHead++);
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPFillRectangle(gDisplayListHead++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPFillWideRectangle(gDisplayListHead++, OTRGetRectDimensionFromLeftEdge(0), 0, OTRGetGameRenderWidth(), SCREEN_HEIGHT);
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
}