From f81781ae8cc8e849d6c91410da7d8e511b7bae5a Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Mon, 21 Jan 2013 23:33:03 -0500 Subject: Properly finalise the current menu when returning to the game. Fixes entries "disappearing" in the recently played games menu. --- source/nds/gui.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3