mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-05-13 03:34:42 -07:00
Change how default flag values are handled
they're now all handled before they're saved/loaded
This commit is contained in:
parent
d7dc198a8b
commit
c5d46f5d46
@ -173,9 +173,6 @@ namespace Bloxstrap
|
||||
BaseDirectory = Path.Combine(Directories.LocalAppData, ProjectName);
|
||||
InitLog();
|
||||
|
||||
// we have reshade enabled by default so we need this
|
||||
FastFlags.SetRenderingMode("Direct3D 11");
|
||||
|
||||
if (!IsQuiet)
|
||||
{
|
||||
IsSetupComplete = false;
|
||||
|
@ -72,6 +72,10 @@ namespace Bloxstrap.Helpers
|
||||
// set to 9999 by default if it doesnt already exist
|
||||
if (GetValue("DFIntTaskSchedulerTargetFps") is null)
|
||||
SetValue("DFIntTaskSchedulerTargetFps", 9999);
|
||||
|
||||
// reshade / exclusive fullscreen requires direct3d 11 to work
|
||||
if (GetValue(RenderingModes["Direct3D 11"]) != "True" && (App.Settings.Prop.UseReShade || App.FastFlags.GetValue("FFlagHandleAltEnterFullscreenManually") == "False"))
|
||||
SetRenderingMode("Direct3D 11");
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
|
@ -78,14 +78,6 @@ namespace Bloxstrap.Helpers
|
||||
|
||||
Bootstrapper.Register();
|
||||
|
||||
// update check: if we're upgrading to v2.1.0 and have reshade enabled,
|
||||
// we need to set our renderer to direct3d 11
|
||||
if (App.Settings.Prop.UseReShade && App.FastFlags.GetValue(FastFlagManager.RenderingModes["Direct3D 11"]) is null)
|
||||
{
|
||||
App.FastFlags.SetRenderingMode("Direct3D 11");
|
||||
App.FastFlags.Save();
|
||||
}
|
||||
|
||||
if (isAutoUpgrade)
|
||||
{
|
||||
NotifyIcon notification = new()
|
||||
|
@ -15,10 +15,7 @@ namespace Bloxstrap.ViewModels
|
||||
|
||||
public ICommand OpenModsFolderCommand => new RelayCommand(OpenModsFolder);
|
||||
|
||||
private void OpenModsFolder()
|
||||
{
|
||||
Process.Start("explorer.exe", Directories.Modifications);
|
||||
}
|
||||
private void OpenModsFolder() => Process.Start("explorer.exe", Directories.Modifications);
|
||||
|
||||
public bool OldDeathSoundEnabled
|
||||
{
|
||||
@ -43,7 +40,7 @@ namespace Bloxstrap.ViewModels
|
||||
public int FramerateLimit
|
||||
{
|
||||
get => Int32.TryParse(App.FastFlags.GetValue("DFIntTaskSchedulerTargetFps"), out int x) ? x : 60;
|
||||
set => App.FastFlags.Changes["DFIntTaskSchedulerTargetFps"] = value;
|
||||
set => App.FastFlags.SetValue("DFIntTaskSchedulerTargetFps", value);
|
||||
}
|
||||
|
||||
public string SelectedRenderingMode
|
||||
@ -68,7 +65,7 @@ namespace Bloxstrap.ViewModels
|
||||
get => App.FastFlags.GetValue("FFlagHandleAltEnterFullscreenManually") == "False";
|
||||
set
|
||||
{
|
||||
App.FastFlags.SetValue("FFlagHandleAltEnterFullscreenManually", value ? false : null);
|
||||
App.FastFlags.SetValue("FFlagHandleAltEnterFullscreenManually", value ? "False" : null);
|
||||
|
||||
if (value)
|
||||
{
|
||||
|
@ -13,8 +13,7 @@ namespace Bloxstrap.Views.Pages
|
||||
{
|
||||
public ModsPage()
|
||||
{
|
||||
if (!App.IsFirstRun)
|
||||
App.FastFlags.Load();
|
||||
App.FastFlags.Load();
|
||||
|
||||
DataContext = new ModsViewModel();
|
||||
InitializeComponent();
|
||||
|
Loading…
Reference in New Issue
Block a user