mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Don't require TaskScheduler FPS flag (#1938)
This commit is contained in:
parent
989ba00995
commit
5fdfc901c4
@ -245,23 +245,6 @@ namespace Bloxstrap
|
|||||||
string? val = GetPreset("UI.Menu.Style.EnableV4.1");
|
string? val = GetPreset("UI.Menu.Style.EnableV4.1");
|
||||||
if (GetPreset("UI.Menu.Style.EnableV4.2") != val)
|
if (GetPreset("UI.Menu.Style.EnableV4.2") != val)
|
||||||
SetPreset("UI.Menu.Style.EnableV4.2", val);
|
SetPreset("UI.Menu.Style.EnableV4.2", val);
|
||||||
|
|
||||||
if (GetPreset("Rendering.Framerate") is not null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// set it to be the framerate of the primary display by default
|
|
||||||
|
|
||||||
var screen = Screen.AllScreens.Where(x => x.Primary).Single();
|
|
||||||
var devmode = new DEVMODEW();
|
|
||||||
|
|
||||||
PInvoke.EnumDisplaySettings(screen.DeviceName, ENUM_DISPLAY_SETTINGS_MODE.ENUM_CURRENT_SETTINGS, ref devmode);
|
|
||||||
|
|
||||||
uint framerate = devmode.dmDisplayFrequency;
|
|
||||||
|
|
||||||
if (framerate <= 100)
|
|
||||||
framerate *= 2;
|
|
||||||
|
|
||||||
SetPreset("Rendering.Framerate", framerate);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
// update migrations
|
// update migrations
|
||||||
|
|
||||||
if (App.BuildMetadata.CommitRef.StartsWith("tag"))
|
if (App.BuildMetadata.CommitRef.StartsWith("tag") && currentVersionInfo.ProductVersion is not null)
|
||||||
{
|
{
|
||||||
if (existingVersionInfo.ProductVersion == "2.4.0")
|
if (existingVersionInfo.ProductVersion == "2.4.0")
|
||||||
{
|
{
|
||||||
@ -227,7 +227,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
App.FastFlags.Save();
|
App.FastFlags.Save();
|
||||||
}
|
}
|
||||||
else if (currentVersionInfo.ProductVersion == "2.6.0")
|
else if (currentVersionInfo.ProductVersion.StartsWith("2.6.0"))
|
||||||
{
|
{
|
||||||
if (App.Settings.Prop.UseDisableAppPatch)
|
if (App.Settings.Prop.UseDisableAppPatch)
|
||||||
{
|
{
|
||||||
@ -246,6 +246,13 @@ namespace Bloxstrap
|
|||||||
if (App.Settings.Prop.BootstrapperStyle == BootstrapperStyle.ClassicFluentDialog)
|
if (App.Settings.Prop.BootstrapperStyle == BootstrapperStyle.ClassicFluentDialog)
|
||||||
App.Settings.Prop.BootstrapperStyle = BootstrapperStyle.FluentDialog;
|
App.Settings.Prop.BootstrapperStyle = BootstrapperStyle.FluentDialog;
|
||||||
|
|
||||||
|
_ = int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x);
|
||||||
|
if (x == 0)
|
||||||
|
{
|
||||||
|
App.FastFlags.SetPreset("Rendering.Framerate", null);
|
||||||
|
App.FastFlags.Save();
|
||||||
|
}
|
||||||
|
|
||||||
App.Settings.Save();
|
App.Settings.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,8 +64,8 @@ namespace Bloxstrap.UI.ViewModels.Menu
|
|||||||
|
|
||||||
public int FramerateLimit
|
public int FramerateLimit
|
||||||
{
|
{
|
||||||
get => int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x) ? x : 60;
|
get => int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x) ? x : 0;
|
||||||
set => App.FastFlags.SetPreset("Rendering.Framerate", value);
|
set => App.FastFlags.SetPreset("Rendering.Framerate", value == 0 ? null : value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IReadOnlyDictionary<RenderingMode, string> RenderingModes => FastFlagManager.RenderingModes;
|
public IReadOnlyDictionary<RenderingMode, string> RenderingModes => FastFlagManager.RenderingModes;
|
||||||
|
Loading…
Reference in New Issue
Block a user