diff --git a/src/game/area.c b/src/game/area.c index 9eed10b2..48b10b75 100644 --- a/src/game/area.c +++ b/src/game/area.c @@ -425,8 +425,13 @@ void render_game(void) { gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT - BORDER_HEIGHT); - if (gDjuiRenderBehindHud && !gDjuiPanelPauseCreated) { - djui_render(); + + if (!gDjuiDisabled && gDjuiRenderBehindHud) { + djui_reset_hud_params(); + create_dl_ortho_matrix(); + djui_gfx_displaylist_begin(); + smlua_call_event_hooks_with_reset_func(HOOK_ON_HUD_RENDER, djui_reset_hud_params); + djui_gfx_displaylist_end(); } render_hud(); diff --git a/src/game/game_init.c b/src/game/game_init.c index 0cbace7d..59e6500f 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -260,10 +260,8 @@ void end_master_display_list(void) { draw_profiler(); } - if (!gDjuiRenderBehindHud || gDjuiPanelPauseCreated) { - extern void djui_render(void); - djui_render(); - } + extern void djui_render(void); + djui_render(); gDPFullSync(gDisplayListHead++); gSPEndDisplayList(gDisplayListHead++); diff --git a/src/pc/djui/djui.c b/src/pc/djui/djui.c index fa13b55f..b15acda1 100644 --- a/src/pc/djui/djui.c +++ b/src/pc/djui/djui.c @@ -91,7 +91,7 @@ void djui_lua_error(char* text) { sDjuiLuaErrorTimeout = 30 * 5; } -static void djui_reset_hud_params(void) { +void djui_reset_hud_params(void) { djui_hud_set_resolution(RESOLUTION_DJUI); djui_hud_set_font(FONT_NORMAL); djui_hud_set_rotation(0, 0, 0); @@ -108,8 +108,10 @@ void djui_render(void) { create_dl_ortho_matrix(); djui_gfx_displaylist_begin(); - djui_reset_hud_params(); - smlua_call_event_hooks_with_reset_func(HOOK_ON_HUD_RENDER, djui_reset_hud_params); + if (!gDjuiRenderBehindHud) { + djui_reset_hud_params(); + smlua_call_event_hooks_with_reset_func(HOOK_ON_HUD_RENDER, djui_reset_hud_params); + } djui_panel_update(); djui_popup_update(); diff --git a/src/pc/djui/djui.h b/src/pc/djui/djui.h index 6aef4f3e..2c7f1f61 100644 --- a/src/pc/djui/djui.h +++ b/src/pc/djui/djui.h @@ -43,3 +43,4 @@ void djui_init(void); void djui_connect_menu_open(void); void djui_lua_error(char* text); void djui_render(void); +void djui_reset_hud_params(void);