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();
|
void HudScaleChanged();
|
||||||
bool M_SetSpecialMenu(FName& menu, int param);
|
bool M_SetSpecialMenu(FName& menu, int param);
|
||||||
void OnMenuOpen(bool makeSound);
|
void OnMenuOpen(bool makeSound);
|
||||||
|
void DestroyAltHUD();
|
||||||
|
|
||||||
DStatusBarCore* StatusBar;
|
DStatusBarCore* StatusBar;
|
||||||
|
|
||||||
|
@ -622,6 +623,7 @@ int GameMain()
|
||||||
}
|
}
|
||||||
//DeleteScreenJob();
|
//DeleteScreenJob();
|
||||||
if (gi) gi->FreeLevelData();
|
if (gi) gi->FreeLevelData();
|
||||||
|
DestroyAltHUD();
|
||||||
DeinitMenus();
|
DeinitMenus();
|
||||||
if (StatusBar) StatusBar->Destroy();
|
if (StatusBar) StatusBar->Destroy();
|
||||||
StatusBar = nullptr;
|
StatusBar = nullptr;
|
||||||
|
|
|
@ -134,14 +134,18 @@ static DObject* DoCreateAltHUD(const FName classname)
|
||||||
return althud;
|
return althud;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateAltHUD()
|
void DestroyAltHUD()
|
||||||
{
|
{
|
||||||
if (AltHud)
|
if (AltHud)
|
||||||
{
|
{
|
||||||
AltHud->Destroy();
|
AltHud->Destroy();
|
||||||
AltHud = nullptr;
|
AltHud = nullptr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateAltHUD()
|
||||||
|
{
|
||||||
|
DestroyAltHUD();
|
||||||
/*
|
/*
|
||||||
if (!hud_althud_forceinternal)
|
if (!hud_althud_forceinternal)
|
||||||
AltHud = DoCreateAltHUD(gameinfo.althudclass);
|
AltHud = DoCreateAltHUD(gameinfo.althudclass);
|
||||||
|
|
Loading…
Reference in a new issue