2023-08-20 09:18:24 +00:00
|
|
|
|
namespace Wabbajack.Configuration;
|
2023-08-17 17:14:58 +00:00
|
|
|
|
|
|
|
|
|
public class MainSettings
|
|
|
|
|
{
|
2023-08-20 09:18:24 +00:00
|
|
|
|
public const string SettingsFileName = "app_settings";
|
2023-08-17 17:14:58 +00:00
|
|
|
|
private const int SettingsVersion = 1;
|
|
|
|
|
|
2023-08-28 15:28:44 +00:00
|
|
|
|
public int CurrentSettingsVersion { get; set; }
|
2023-08-17 17:14:58 +00:00
|
|
|
|
|
2023-08-28 15:28:44 +00:00
|
|
|
|
public PerformanceSettings PerformanceSettings { get; set; } = new();
|
2023-08-17 17:14:58 +00:00
|
|
|
|
|
|
|
|
|
public bool Upgrade()
|
|
|
|
|
{
|
|
|
|
|
if (CurrentSettingsVersion == SettingsVersion)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CurrentSettingsVersion < 1)
|
|
|
|
|
{
|
|
|
|
|
PerformanceSettings.MaximumMemoryPerDownloadThreadMb = -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CurrentSettingsVersion = SettingsVersion;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|