From 5e740253b6dc091d59fcc70928ea1675bc545129 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Fri, 16 Oct 2020 22:43:26 -0600 Subject: [PATCH] Added connection transition (#86) * Added content to custom_menu_destroy() * Added connection transition * Update custom_menu_system.c Co-authored-by: djoslin0 --- src/menu/custom_menu.c | 6 +++++- src/menu/custom_menu_system.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/menu/custom_menu.c b/src/menu/custom_menu.c index 9afb5963..987bf720 100644 --- a/src/menu/custom_menu.c +++ b/src/menu/custom_menu.c @@ -292,7 +292,11 @@ void custom_menu_init(struct CustomMenu* head) { void custom_menu_loop(void) { // we've received an event that makes us exit the menus - if (sGotoGame) { sSelectedFileNum = sGotoGame; } + if (sGotoGame) { + sSelectedFileNum = sGotoGame; + custom_menu_close_system(); + custom_menu_destroy(); + } // force-start the load when command-line server hosting if (gNetworkType == NT_SERVER && sSelectedFileNum == 0) { diff --git a/src/menu/custom_menu_system.c b/src/menu/custom_menu_system.c index ce1e14cf..d92dc0ca 100644 --- a/src/menu/custom_menu_system.c +++ b/src/menu/custom_menu_system.c @@ -96,7 +96,11 @@ void custom_menu_system_init(void) { } void custom_menu_destroy(void) { - /* TODO: we should probably clean up all of this stuff */ + // TODO: clean up all of the calloc()'d memory + sHead = NULL; + sCurrentMenu = NULL; + sLastMenu = NULL; + overlay = NULL; } void custom_menu_system_loop(void) {