From 8eb3bc43a41c199ac52d7f773d3938b3189c640a Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 29 Oct 2021 01:56:03 -0400 Subject: [PATCH] add check --- src/gz/zu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gz/zu.c b/src/gz/zu.c index 54c9f5b3..62eb4b40 100644 --- a/src/gz/zu.c +++ b/src/gz/zu.c @@ -683,10 +683,13 @@ void zu_execute_game(int16_t entrance_index, uint16_t cutscene_index) void zu_execute_filemenu(void) { - z64_file.interface_flag = 0; - z64_ctxt.state_continue = 0; - z64_ctxt.next_ctor = z64_state_ovl_tab[5].vram_ctor; - z64_ctxt.next_size = z64_state_ovl_tab[5].ctxt_size; + if( (uint32_t)z64_ctxt.state_dtor != z64_state_ovl_tab[5].vram_dtor){ + z64_file.interface_flag = 0; + z64_ctxt.state_continue = 0; + z64_ctxt.next_ctor = z64_state_ovl_tab[5].vram_ctor; + z64_ctxt.next_size = z64_state_ovl_tab[5].ctxt_size; + } else + gz_log("Can not change to file select here"); } _Bool zu_in_game(void)