Make Device Location Name configuration (custom TZ) (#1031)
This permit to use arbitrary timezone (instead of UTC). Useful for games like ACNH.
This commit is contained in:
parent
82c3df83c4
commit
0dd38028cb
6 changed files with 148 additions and 27 deletions
|
@ -153,6 +153,11 @@ namespace Ryujinx.Configuration
|
|||
/// </summary>
|
||||
public ReactiveObject<Region> Region { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Change System TimeZone
|
||||
/// </summary>
|
||||
public ReactiveObject<string> TimeZone { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables Docked Mode
|
||||
/// </summary>
|
||||
|
@ -182,6 +187,7 @@ namespace Ryujinx.Configuration
|
|||
{
|
||||
Language = new ReactiveObject<Language>();
|
||||
Region = new ReactiveObject<Region>();
|
||||
TimeZone = new ReactiveObject<string>();
|
||||
EnableDockedMode = new ReactiveObject<bool>();
|
||||
EnableMulticoreScheduling = new ReactiveObject<bool>();
|
||||
EnableFsIntegrityChecks = new ReactiveObject<bool>();
|
||||
|
@ -295,7 +301,7 @@ namespace Ryujinx.Configuration
|
|||
{
|
||||
ConfigurationFileFormat configurationFile = new ConfigurationFileFormat
|
||||
{
|
||||
Version = 2,
|
||||
Version = ConfigurationFileFormat.CurrentVersion,
|
||||
GraphicsShadersDumpPath = Graphics.ShadersDumpPath,
|
||||
LoggingEnableDebug = Logger.EnableDebug,
|
||||
LoggingEnableStub = Logger.EnableStub,
|
||||
|
@ -308,6 +314,7 @@ namespace Ryujinx.Configuration
|
|||
EnableFileLog = Logger.EnableFileLog,
|
||||
SystemLanguage = System.Language,
|
||||
SystemRegion = System.Region,
|
||||
SystemTimeZone = System.TimeZone,
|
||||
DockedMode = System.EnableDockedMode,
|
||||
EnableDiscordIntegration = EnableDiscordIntegration,
|
||||
EnableVsync = Graphics.EnableVsync,
|
||||
|
@ -354,6 +361,7 @@ namespace Ryujinx.Configuration
|
|||
Logger.EnableFileLog.Value = true;
|
||||
System.Language.Value = Language.AmericanEnglish;
|
||||
System.Region.Value = Region.USA;
|
||||
System.TimeZone.Value = "UTC";
|
||||
System.EnableDockedMode.Value = false;
|
||||
EnableDiscordIntegration.Value = true;
|
||||
Graphics.EnableVsync.Value = true;
|
||||
|
@ -452,7 +460,7 @@ namespace Ryujinx.Configuration
|
|||
{
|
||||
bool configurationFileUpdated = false;
|
||||
|
||||
if (configurationFileFormat.Version < 0 || configurationFileFormat.Version > 2)
|
||||
if (configurationFileFormat.Version < 0 || configurationFileFormat.Version > ConfigurationFileFormat.CurrentVersion)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
||||
|
||||
|
@ -463,13 +471,22 @@ namespace Ryujinx.Configuration
|
|||
|
||||
if (configurationFileFormat.Version < 2)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, needs to be updated.");
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 2.");
|
||||
|
||||
configurationFileFormat.SystemRegion = Region.USA;
|
||||
|
||||
configurationFileUpdated = true;
|
||||
}
|
||||
|
||||
if (configurationFileFormat.Version < 3)
|
||||
{
|
||||
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 3.");
|
||||
|
||||
configurationFileFormat.SystemTimeZone = "UTC";
|
||||
|
||||
configurationFileUpdated = true;
|
||||
}
|
||||
|
||||
Graphics.ShadersDumpPath.Value = configurationFileFormat.GraphicsShadersDumpPath;
|
||||
Logger.EnableDebug.Value = configurationFileFormat.LoggingEnableDebug;
|
||||
Logger.EnableStub.Value = configurationFileFormat.LoggingEnableStub;
|
||||
|
@ -482,6 +499,7 @@ namespace Ryujinx.Configuration
|
|||
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
||||
System.Language.Value = configurationFileFormat.SystemLanguage;
|
||||
System.Region.Value = configurationFileFormat.SystemRegion;
|
||||
System.TimeZone.Value = configurationFileFormat.SystemTimeZone;
|
||||
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
||||
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
||||
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue