aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorNebuleon Fumika2013-01-21 23:33:03 -0500
committerNebuleon Fumika2013-01-21 23:33:03 -0500
commitf81781ae8cc8e849d6c91410da7d8e511b7bae5a (patch)
tree05f03dd21fa4c4f195716491b7d624f75160c060 /source
parent0f91ed22f32bae7e8fb924fa4458142fa5894f83 (diff)
downloadsnes9x2005-f81781ae8cc8e849d6c91410da7d8e511b7bae5a.tar.gz
snes9x2005-f81781ae8cc8e849d6c91410da7d8e511b7bae5a.tar.bz2
snes9x2005-f81781ae8cc8e849d6c91410da7d8e511b7bae5a.zip
Properly finalise the current menu when returning to the game. Fixes entries "disappearing" in the recently played games menu.
Diffstat (limited to 'source')
-rw-r--r--source/nds/gui.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c
index 293361f..fe23cb5 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -3615,6 +3615,8 @@ u32 menu(u16 *screen)
}
else if(current_option->option_type & ACTION_TYPE)
current_option->action_function();
+ else if(current_option->option_type & SUBMENU_TYPE)
+ choose_menu(current_option->sub_menu);
}
/* Save states */
else if(current_menu == (main_menu.options + 1)->sub_menu)
@@ -3894,6 +3896,10 @@ u32 menu(u16 *screen)
ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD);
} // end while
+
+ if (current_menu && current_menu->end_function)
+ current_menu->end_function();
+
destroy_dynamic_cheats();
if(bg_screenp != NULL) free((void*)bg_screenp);