mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- fixed stuck memory usage warning in options menu
https://forum.zdoom.org/viewtopic.php?t=62186
This commit is contained in:
parent
5e04678965
commit
9cffc29134
1 changed files with 18 additions and 2 deletions
|
@ -540,14 +540,19 @@ class CompatibilityMenu : OptionMenu
|
|||
class GLTextureGLOptions : OptionMenu
|
||||
{
|
||||
private int mWarningIndex;
|
||||
private string mWarningLabel;
|
||||
|
||||
override void Init(Menu parent, OptionMenuDescriptor desc)
|
||||
{
|
||||
super.Init(parent, desc);
|
||||
|
||||
// Find index of warning item placeholder
|
||||
mWarningIndex = -1;
|
||||
mWarningLabel = "!HQRESIZE_WARNING!";
|
||||
|
||||
for (int i=0; i < mDesc.mItems.Size(); ++i)
|
||||
{
|
||||
if (mDesc.mItems[i].mLabel == "!HQRESIZE_WARNING!")
|
||||
if (mDesc.mItems[i].mLabel == mWarningLabel)
|
||||
{
|
||||
mWarningIndex = i;
|
||||
break;
|
||||
|
@ -555,11 +560,22 @@ class GLTextureGLOptions : OptionMenu
|
|||
}
|
||||
}
|
||||
|
||||
override void OnDestroy()
|
||||
{
|
||||
// Restore warning item placeholder
|
||||
if (mWarningIndex >= 0)
|
||||
{
|
||||
mDesc.mItems[mWarningIndex].mLabel = mWarningLabel;
|
||||
}
|
||||
|
||||
Super.OnDestroy();
|
||||
}
|
||||
|
||||
override void Ticker()
|
||||
{
|
||||
Super.Ticker();
|
||||
|
||||
if (mWarningIndex > 0)
|
||||
if (mWarningIndex >= 0)
|
||||
{
|
||||
string message;
|
||||
|
||||
|
|
Loading…
Reference in a new issue