mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-21 00:59:59 -04:00
Triforce v0.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
23
builder/HookshotBuilder/BuilderSettings.cs
Normal file
23
builder/HookshotBuilder/BuilderSettings.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace HookshotBuilder;
|
||||
|
||||
/// What the player chose last time (the install folder, the game files, the shaders' tick): builder-settings.json beside the versions
|
||||
sealed class BuilderSettings
|
||||
{
|
||||
public string? Out { get; set; }
|
||||
public string? Nup { get; set; }
|
||||
public string? Romfs { get; set; }
|
||||
public string? Exefs { get; set; }
|
||||
public bool Dlss { get; set; } // (NVIDIA DLSS ticked: NVIDIA's license was accepted)
|
||||
public bool Fsr { get; set; } // (AMD FSR 4 ticked)
|
||||
public bool PrepareLater { get; set; } // ("Prepare shaders now" unticked)
|
||||
|
||||
public static BuilderSettings? Load(string path)
|
||||
{
|
||||
try { return System.Text.Json.JsonSerializer.Deserialize<BuilderSettings>(System.IO.File.ReadAllText(path)); }
|
||||
catch (Exception) { return null; }
|
||||
}
|
||||
|
||||
/// (the updates, from the launcher's Update and from the --update start after a self-update, begin before ApplySettings sets
|
||||
/// the tick from these settings: they read the saved choice itself. None saved: prepared, as the tick's default)
|
||||
public static bool PrepareNow(string path) => Load(path)?.PrepareLater != true;
|
||||
}
|
||||
Reference in New Issue
Block a user