- plugged all memory leaks that were reported with Shadow Warrior when starting the first level.

This commit is contained in:
Christoph Oelckers 2019-12-25 11:26:19 +01:00
parent 5e821de481
commit b0cefdedce
21 changed files with 102 additions and 430 deletions

View file

@ -422,7 +422,7 @@ void M_ActivateMenu(DMenu *menu)
bool M_SetMenu(FName menu, int param, FName caller)
{
#if 0
#if 0
// skip the menu and go right into the first level.
// For tracking memory leaks that normally require operating the menu to start the game so that they always get the same allocation number.
GameStartupInfo.Episode = GameStartupInfo.Skill = 0;
@ -908,7 +908,7 @@ void M_Drawer (void)
//
//=============================================================================
void M_ClearMenus ()
void M_ClearMenus (bool final)
{
M_DemoNoPlay = false;
transition.previous = transition.current = nullptr;
@ -923,8 +923,11 @@ void M_ClearMenus ()
}
DMenu::CurrentMenu = nullptr;
menuactive = MENU_Off;
mouseGrabInput(true);
gi->MenuClosed();
if (!final)
{
mouseGrabInput(true);
gi->MenuClosed();
}
}
void Menu_Close(int playerid)