From bfd441930916e7a29200ea42d5d8edfcc2baa806 Mon Sep 17 00:00:00 2001 From: Cloudwalk Date: Thu, 22 Jul 2021 19:13:20 -0400 Subject: [PATCH] sv_save: Call CL_Disconnect and ToggleMenu via hook --- sv_save.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sv_save.c b/sv_save.c index ea5ab704..b90f7487 100644 --- a/sv_save.c +++ b/sv_save.c @@ -270,16 +270,11 @@ void SV_Loadgame_f(cmd_state_t *cmd) Con_Printf("Loading game from %s...\n", filename); - // stop playing demos - if (cls.demoplayback) - CL_Disconnect(); - -#ifdef CONFIG_MENU - // remove menu - if (key_dest == key_menu || key_dest == key_menu_grabbed) - MR_ToggleMenu(0); -#endif - key_dest = key_game; + if(host.hook.Disconnect) + host.hook.Disconnect(false, NULL); + + if(host.hook.ToggleMenu) + host.hook.ToggleMenu(); cls.demonum = -1; // stop demo loop in case this fails -- 2.39.2