bug fixed (emulator crash when copying configuration file)
This commit is contained in:
parent
57d7c9d246
commit
f0ab243ecf
@ -163,25 +163,6 @@ namespace Ryujinx.Ava
|
||||
string overrideLocalConfigurationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ReleaseInformation.CustomConfigNameOverride);
|
||||
string overrideAppDataConfigurationPath = Path.Combine(AppDataManager.BaseDirPath, ReleaseInformation.CustomConfigNameOverride);
|
||||
|
||||
// Copies and reloads the configuration file if the game was loaded with arguments
|
||||
// based on global configuration
|
||||
if (CommandLineState.CountArguments > 0)
|
||||
{
|
||||
if (File.Exists(localConfigurationPath))
|
||||
{
|
||||
File.Copy(localConfigurationPath, overrideLocalConfigurationPath, overwrite: true);
|
||||
}
|
||||
|
||||
localConfigurationPath = overrideLocalConfigurationPath;
|
||||
|
||||
if (File.Exists(appDataConfigurationPath))
|
||||
{
|
||||
File.Copy(appDataConfigurationPath, overrideAppDataConfigurationPath, overwrite: true);
|
||||
}
|
||||
|
||||
appDataConfigurationPath = overrideAppDataConfigurationPath;
|
||||
}
|
||||
|
||||
// Now load the configuration as the other subsystems are now registered
|
||||
if (File.Exists(localConfigurationPath))
|
||||
{
|
||||
@ -200,6 +181,7 @@ namespace Ryujinx.Ava
|
||||
|
||||
ConfigurationState.Instance.LoadDefault();
|
||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath);
|
||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(overrideAppDataConfigurationPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -208,6 +190,7 @@ namespace Ryujinx.Ava
|
||||
if (ConfigurationFileFormat.TryLoad(ConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
||||
{
|
||||
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(overrideAppDataConfigurationPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -217,6 +200,21 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
}
|
||||
|
||||
// Copies and reloads the configuration file if the game was loaded with arguments
|
||||
// based on global configuration
|
||||
if (CommandLineState.CountArguments > 0)
|
||||
{
|
||||
if (File.Exists(overrideLocalConfigurationPath))
|
||||
{
|
||||
ConfigurationPath = overrideLocalConfigurationPath;
|
||||
}
|
||||
|
||||
if (File.Exists(overrideAppDataConfigurationPath))
|
||||
{
|
||||
ConfigurationPath = overrideAppDataConfigurationPath;
|
||||
}
|
||||
}
|
||||
|
||||
UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration;
|
||||
|
||||
// Check if graphics backend was overridden
|
||||
|
Loading…
x
Reference in New Issue
Block a user