Fix selected menu version not applying (#528)

This commit is contained in:
pizzaboxer 2023-08-23 10:27:30 +01:00
parent 47dcec060b
commit 1e8a4359d7
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
3 changed files with 23 additions and 7 deletions

View File

@ -42,7 +42,12 @@ namespace Bloxstrap
{ "UI.Menu.GraphicsSlider", "FFlagFixGraphicsQuality" },
{ "UI.Menu.Style.DisableV2", "FFlagDisableNewIGMinDUA" },
{ "UI.Menu.Style.EnableV4", "FFlagEnableInGameMenuControls" }
{ "UI.Menu.Style.EnableV4", "FFlagEnableInGameMenuControls" },
{ "UI.Menu.Style.ABTest.1", "FFlagEnableMenuControlsABTest" },
{ "UI.Menu.Style.ABTest.2", "FFlagEnableMenuModernizationABTest" },
{ "UI.Menu.Style.ABTest.3", "FFlagEnableMenuModernizationABTest2" },
{ "UI.Menu.Style.ABTest.4", "FFlagEnableV3MenuABTest3" }
};
// only one missing here is Metal because lol
@ -81,7 +86,8 @@ namespace Bloxstrap
new Dictionary<string, string?>
{
{ "DisableV2", null },
{ "EnableV4", null }
{ "EnableV4", null },
{ "ABTest", null }
}
},
@ -90,7 +96,8 @@ namespace Bloxstrap
new Dictionary<string, string?>
{
{ "DisableV2", "True" },
{ "EnableV4", "False" }
{ "EnableV4", "False" },
{ "ABTest", "False" }
}
},
@ -99,7 +106,8 @@ namespace Bloxstrap
new Dictionary<string, string?>
{
{ "DisableV2", "False" },
{ "EnableV4", "False" }
{ "EnableV4", "False" },
{ "ABTest", "False" }
}
},
@ -108,7 +116,8 @@ namespace Bloxstrap
new Dictionary<string, string?>
{
{ "DisableV2", "True" },
{ "EnableV4", "True" }
{ "EnableV4", "True" },
{ "ABTest", "False" }
}
}
};

View File

@ -223,6 +223,10 @@ namespace Bloxstrap
else if (existingVersionInfo.ProductVersion == "2.5.0")
{
App.FastFlags.SetValue("FIntDebugForceMSAASamples", null);
if (App.FastFlags.GetPreset("UI.Menu.Style.DisableV2") is not null)
App.FastFlags.SetPreset("UI.Menu.Style.ABTest", false);
App.FastFlags.Save();
}
}

View File

@ -101,9 +101,12 @@ namespace Bloxstrap.UI.ViewModels.Menu
foreach (var flag in version.Value)
{
if (App.FastFlags.GetPreset($"UI.Menu.Style.{flag.Key}") != flag.Value)
foreach (var presetFlag in FastFlagManager.PresetFlags.Where(x => x.Key.StartsWith($"UI.Menu.Style.{flag.Key}")))
{
if (App.FastFlags.GetValue(presetFlag.Value) != flag.Value)
flagsMatch = false;
}
}
if (flagsMatch)
return version.Key;