mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- blacklist old FMod related sound CVARs because they tend to be in the UnknownCVARs section but aren't useful any longer.
This commit is contained in:
parent
f1ad42c4e5
commit
842e8b68b4
3 changed files with 21 additions and 6 deletions
|
@ -537,6 +537,7 @@ static bool FindMatchingItem(DMenuItemBase *desc)
|
|||
if (grp == 5) return true; // static texts always match
|
||||
|
||||
FName name = desc->mAction;
|
||||
|
||||
if (grp == 1)
|
||||
{
|
||||
// Check for presence of menu
|
||||
|
@ -545,9 +546,17 @@ static bool FindMatchingItem(DMenuItemBase *desc)
|
|||
}
|
||||
else if (grp == 4)
|
||||
{
|
||||
static const FName CVarBlacklist[] = {
|
||||
NAME_snd_waterlp, NAME_snd_output, NAME_snd_output_format, NAME_snd_speakermode, NAME_snd_resampler, NAME_AlwaysRun };
|
||||
|
||||
// Check for presence of CVAR and blacklist
|
||||
auto cv = GetCVar(nullptr, name.GetChars());
|
||||
auto cv = FindCVar(name.GetChars(), nullptr);
|
||||
if (cv == nullptr) return true;
|
||||
|
||||
for (auto bname : CVarBlacklist)
|
||||
{
|
||||
if (name == bname) return true;
|
||||
}
|
||||
}
|
||||
|
||||
MenuDescriptorList::Iterator it(MenuDescriptors);
|
||||
|
@ -585,15 +594,16 @@ static bool ReplaceMenu(FScanner &sc, DMenuDescriptor *desc)
|
|||
}
|
||||
if (desc->mItems.Size() > 0)
|
||||
{
|
||||
auto sep = CreateOptionMenuItemStaticText("---------------", CR_YELLOW);
|
||||
auto sep = CreateOptionMenuItemStaticText(" ");
|
||||
(*pOld)->mItems.Push(sep);
|
||||
auto sep = CreateOptionMenuItemStaticText("---------------", 1);
|
||||
(*pOld)->mItems.Push(sep);
|
||||
for (auto it : desc->mItems)
|
||||
{
|
||||
(*pOld)->mItems.Push(it);
|
||||
}
|
||||
desc->mItems.Clear();
|
||||
|
||||
sc.ScriptMessage("Merged %d items into %s", desc->mItems.Size(), desc->mMenuName.GetChars());
|
||||
//sc.ScriptMessage("Merged %d items into %s", desc->mItems.Size(), desc->mMenuName.GetChars());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -937,4 +937,10 @@ xx(OptionMenuFieldBase)
|
|||
xx(OptionMenuItemColorPicker)
|
||||
xx(OptionMenuItemStaticText)
|
||||
xx(OptionMenuItemStaticTextSwitchable)
|
||||
xx(mAction)
|
||||
|
||||
// blacklisted former CVARs
|
||||
xx(snd_waterlp)
|
||||
xx(snd_output)
|
||||
xx(snd_output_format)
|
||||
xx(snd_speakermode)
|
||||
xx(snd_resampler)
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
EXTERN_CVAR (Float, snd_sfxvolume)
|
||||
CVAR (Int, snd_samplerate, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Int, snd_buffersize, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (String, snd_output, "default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Int, snd_hrtf, -1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
||||
#if !defined(NO_OPENAL)
|
||||
|
|
Loading…
Reference in a new issue