Add TitleId for the instances so that it is easier to track which title it is referring to
This commit is contained in:
parent
a398575513
commit
fbe8713a92
1 changed files with 5 additions and 3 deletions
|
@ -588,6 +588,8 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static ConfigurationState Title { get; private set; }
|
public static ConfigurationState Title { get; private set; }
|
||||||
|
|
||||||
|
public string TitleId { get; private set; } = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The UI section
|
/// The UI section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1681,7 +1683,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
string globalAppDataConfigurationPath = Path.Combine(AppDataManager.BaseDirPath, $"Config.json");
|
string globalAppDataConfigurationPath = Path.Combine(AppDataManager.BaseDirPath, $"Config.json");
|
||||||
string globalConfigurationPath = File.Exists(globalLocalConfigurationPath) ? globalLocalConfigurationPath : File.Exists(globalAppDataConfigurationPath) ? globalAppDataConfigurationPath : null;
|
string globalConfigurationPath = File.Exists(globalLocalConfigurationPath) ? globalLocalConfigurationPath : File.Exists(globalAppDataConfigurationPath) ? globalAppDataConfigurationPath : null;
|
||||||
|
|
||||||
Title = new ConfigurationState();
|
Title = new ConfigurationState { TitleId = titleId };
|
||||||
|
|
||||||
// No configuration, we load the shared config values and save it to disk.
|
// No configuration, we load the shared config values and save it to disk.
|
||||||
if (ConfigurationFileFormat.TryLoad(globalConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
if (ConfigurationFileFormat.TryLoad(globalConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
||||||
|
@ -1698,7 +1700,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
{
|
{
|
||||||
if (!LoadConfigurationStateForTitle(titleId))
|
if (!LoadConfigurationStateForTitle(titleId))
|
||||||
{
|
{
|
||||||
Title = new ConfigurationState();
|
Title = new ConfigurationState { TitleId = titleId };
|
||||||
Title.LoadDefault();
|
Title.LoadDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1718,7 +1720,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
|
|
||||||
if (ConfigurationFileFormat.TryLoad(gameConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
if (ConfigurationFileFormat.TryLoad(gameConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
||||||
{
|
{
|
||||||
Title = new ConfigurationState();
|
Title = new ConfigurationState { TitleId = titleId };
|
||||||
Title.Load(configurationFileFormat, gameConfigurationPath);
|
Title.Load(configurationFileFormat, gameConfigurationPath);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue