mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- explicitly destroy the AltHUD when exiting.
This is to avoid problems with the GC on shutdown.
This commit is contained in:
parent
6c3d03cd48
commit
1bfccbcb6e
2 changed files with 7 additions and 1 deletions
|
@ -165,6 +165,7 @@ bool G_Responder(event_t* ev);
|
|||
void HudScaleChanged();
|
||||
bool M_SetSpecialMenu(FName& menu, int param);
|
||||
void OnMenuOpen(bool makeSound);
|
||||
void DestroyAltHUD();
|
||||
|
||||
DStatusBarCore* StatusBar;
|
||||
|
||||
|
@ -622,6 +623,7 @@ int GameMain()
|
|||
}
|
||||
//DeleteScreenJob();
|
||||
if (gi) gi->FreeLevelData();
|
||||
DestroyAltHUD();
|
||||
DeinitMenus();
|
||||
if (StatusBar) StatusBar->Destroy();
|
||||
StatusBar = nullptr;
|
||||
|
|
|
@ -134,14 +134,18 @@ static DObject* DoCreateAltHUD(const FName classname)
|
|||
return althud;
|
||||
}
|
||||
|
||||
void CreateAltHUD()
|
||||
void DestroyAltHUD()
|
||||
{
|
||||
if (AltHud)
|
||||
{
|
||||
AltHud->Destroy();
|
||||
AltHud = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CreateAltHUD()
|
||||
{
|
||||
DestroyAltHUD();
|
||||
/*
|
||||
if (!hud_althud_forceinternal)
|
||||
AltHud = DoCreateAltHUD(gameinfo.althudclass);
|
||||
|
|
Loading…
Reference in a new issue