diff --git a/Bloxstrap/FastFlagManager.cs b/Bloxstrap/FastFlagManager.cs index 421abbee..42335a33 100644 --- a/Bloxstrap/FastFlagManager.cs +++ b/Bloxstrap/FastFlagManager.cs @@ -23,6 +23,7 @@ public class FastFlagManager : JsonManager> { "Rendering.ManualFullscreen", "FFlagHandleAltEnterFullscreenManually" }, { "Rendering.TexturePack", "FStringPartTexturePackTable2022" }, { "Rendering.DisableScaling", "DFFlagDisableDPIScale" }, + { "Rendering.MSAA", "FIntDebugForceMSAASamples" }, { "Rendering.Mode.D3D11", "FFlagDebugGraphicsPreferD3D11" }, { "Rendering.Mode.D3D10", "FFlagDebugGraphicsPreferD3D11FL10" }, @@ -61,6 +62,15 @@ public class FastFlagManager : JsonManager> { "Future (Phase 3)", "Future" } }; + public static IReadOnlyDictionary MSAAModes => new Dictionary + { + { "Automatic", null }, + { "1x MSAA", "1" }, + { "2x MSAA", "2" }, + { "4x MSAA", "4" }, + { "8x MSAA", "8" } + }; + // this is one hell of a dictionary definition lmao // since these all set the same flags, wouldn't making this use bitwise operators be better? public static IReadOnlyDictionary> IGMenuVersions => new Dictionary> @@ -118,7 +128,7 @@ public void SetValue(string key, object? value) else { if (Prop.ContainsKey(key)) - App.Logger.WriteLine(LOG_IDENT, $"Setting of '{key}' from '{Prop[key]}' to '{value}' is pending"); + App.Logger.WriteLine(LOG_IDENT, $"Changing of '{key}' from '{Prop[key]}' to '{value}' is pending"); else App.Logger.WriteLine(LOG_IDENT, $"Setting of '{key}' to '{value}' is pending"); diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml index 666e6652..50c0501f 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml @@ -171,6 +171,15 @@ + + + + + + + + + diff --git a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs index 8b95d0cb..28ba70dd 100644 --- a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs @@ -127,6 +127,14 @@ public string SelectedLightingMode set => App.FastFlags.SetPresetEnum("Rendering.Lighting", LightingModes[value], "True"); } + public IReadOnlyDictionary MSAAModes => FastFlagManager.MSAAModes; + + public string SelectedMSAAMode + { + get => MSAAModes.First(x => x.Value == App.FastFlags.GetPreset("Rendering.MSAA")).Key ?? MSAAModes.First().Key; + set => App.FastFlags.SetPreset("Rendering.MSAA", MSAAModes[value]); + } + public bool GuiHidingEnabled { get => App.FastFlags.GetPreset("UI.Hide") == "32380007";