Skip to content

Commit

Permalink
Merge branch 'version-2.5.4' into version-2.5.4-nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Feb 10, 2024
2 parents 10f460c + 880c076 commit 429e417
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 200 deletions.
4 changes: 2 additions & 2 deletions Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<UseWPF>true</UseWPF>
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
<Version>2.5.3</Version>
<FileVersion>2.5.3.0</FileVersion>
<Version>2.5.4</Version>
<FileVersion>2.5.4.0</FileVersion>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

Expand Down
27 changes: 25 additions & 2 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,30 @@ private async Task CheckLatestVersion()
}
catch (HttpResponseException ex)
{
if (ex.ResponseMessage.StatusCode != HttpStatusCode.NotFound)
// If channel does not exist
if (ex.ResponseMessage.StatusCode == HttpStatusCode.NotFound)
{
App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because a WindowsPlayer build does not exist for {App.Settings.Prop.Channel}");
}
// If channel is not available to the user (private/internal release channel)
else if (ex.ResponseMessage.StatusCode == HttpStatusCode.Unauthorized)
{
App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because {App.Settings.Prop.Channel} is restricted for public use.");

// Only prompt if user has channel switching mode set to something other than Automatic.
if (App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Automatic)
{
Controls.ShowMessageBox(
$"The channel you're currently on ({App.Settings.Prop.Channel}) has now been restricted from public use. You will now be on the default channel ({RobloxDeployment.DefaultChannel}).",
MessageBoxImage.Information
);
}
}
else
{
throw;
}

App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because a WindowsPlayer build does not exist for {App.Settings.Prop.Channel}");
App.Settings.Prop.Channel = RobloxDeployment.DefaultChannel;
clientVersion = await RobloxDeployment.GetInfo(App.Settings.Prop.Channel);
}
Expand Down Expand Up @@ -498,7 +518,10 @@ public static void CheckInstall()

// in case the user is reinstalling
if (File.Exists(Paths.Application) && App.IsFirstRun)
{
Filesystem.AssertReadOnly(Paths.Application);
File.Delete(Paths.Application);
}

// check to make sure bootstrapper is in the install folder
if (!File.Exists(Paths.Application) && Environment.ProcessPath is not null)
Expand Down
27 changes: 2 additions & 25 deletions Bloxstrap/FastFlagManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ public class FastFlagManager : JsonManager<Dictionary<string, object>>
{ "Rendering.TexturePack", "FStringPartTexturePackTable2022" },
{ "Rendering.DisableScaling", "DFFlagDisableDPIScale" },

{ "Rendering.Mode.D3D11", "FFlagDebugGraphicsPreferD3D11" },
{ "Rendering.Mode.D3D10", "FFlagDebugGraphicsPreferD3D11FL10" },
{ "Rendering.Mode.Vulkan", "FFlagDebugGraphicsPreferVulkan" },
{ "Rendering.Mode.Vulkan.Fix", "FFlagRenderVulkanFixMinimizeWindow" },
{ "Rendering.Mode.OpenGL", "FFlagDebugGraphicsPreferOpenGL" },

{ "Rendering.Lighting.Voxel", "DFFlagDebugRenderForceTechnologyVoxel" },
{ "Rendering.Lighting.ShadowMap", "FFlagDebugForceFutureIsBrightPhase2" },
{ "Rendering.Lighting.Future", "FFlagDebugForceFutureIsBrightPhase3" },
Expand All @@ -53,16 +47,6 @@ public class FastFlagManager : JsonManager<Dictionary<string, object>>
{ "UI.Menu.Style.ABTest.4", "FFlagEnableV3MenuABTest3" }
};

// only one missing here is Metal because lol
public static IReadOnlyDictionary<string, string> RenderingModes => new Dictionary<string, string>
{
{ "Automatic", "None" },
{ "Vulkan", "Vulkan" },
{ "Direct3D 11", "D3D11" },
{ "Direct3D 10", "D3D10" },
{ "OpenGL", "OpenGL" }
};

public static IReadOnlyDictionary<string, string> LightingModes => new Dictionary<string, string>
{
{ "Chosen by game", "None" },
Expand Down Expand Up @@ -199,14 +183,6 @@ public string GetPresetEnum(IReadOnlyDictionary<string, string> mapping, string
return mapping.First().Key;
}

public void CheckManualFullscreenPreset()
{
if (GetPreset("Rendering.Mode.Vulkan") == "True" || GetPreset("Rendering.Mode.OpenGL") == "True")
SetPreset("Rendering.ManualFullscreen", null);
else
SetPreset("Rendering.ManualFullscreen", "False");
}

public override void Save()
{
// convert all flag values to strings before saving
Expand All @@ -221,7 +197,8 @@ public override void Load()
{
base.Load();

CheckManualFullscreenPreset();
if (GetPreset("Rendering.ManualFullscreen") != "False")
SetPreset("Rendering.ManualFullscreen", "False");

// TODO - remove when activity tracking has been revamped
if (GetPreset("Network.Log") != "7")
Expand Down
10 changes: 10 additions & 0 deletions Bloxstrap/InstallChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ internal static void CheckUpgrade()
if (App.FastFlags.GetPreset("UI.Menu.Style.DisableV2") is not null)
App.FastFlags.SetPreset("UI.Menu.Style.ABTest", false);

App.FastFlags.Save();
}
else if (existingVersionInfo.ProductVersion == "2.5.3")
{
App.FastFlags.SetValue("FFlagDebugGraphicsPreferD3D11", null);
App.FastFlags.SetValue("FFlagDebugGraphicsPreferD3D11FL10", null);
App.FastFlags.SetValue("FFlagDebugGraphicsPreferVulkan", null);
App.FastFlags.SetValue("FFlagRenderVulkanFixMinimizeWindow", null);
App.FastFlags.SetValue("FFlagDebugGraphicsPreferOpenGL", null);

App.FastFlags.Save();
}
}
Expand Down
Loading

0 comments on commit 429e417

Please sign in to comment.