diff --git a/src/Ryujinx/Headless/HeadlessRyujinx.cs b/src/Ryujinx/Headless/HeadlessRyujinx.cs index 77f930e7e..1abb857e1 100644 --- a/src/Ryujinx/Headless/HeadlessRyujinx.cs +++ b/src/Ryujinx/Headless/HeadlessRyujinx.cs @@ -142,7 +142,11 @@ namespace Ryujinx.Headless string configurationPath = null; // Now load the configuration as the other subsystems are now registered - if (File.Exists(localConfigurationPath)) + if (customConfigPath != null && File.Exists(customConfigPath)) + { + configurationPath = customConfigPath; + } + else if (File.Exists(localConfigurationPath)) { configurationPath = localConfigurationPath; } @@ -150,10 +154,6 @@ namespace Ryujinx.Headless { configurationPath = appDataConfigurationPath; } - else if (customConfigPath != null && File.Exists(customConfigPath)) - { - configurationPath = customConfigPath; - } if (configurationPath == null) { @@ -412,12 +412,20 @@ namespace Ryujinx.Headless static void Load(string[] originalArgs, Options option) { Initialize(); - + + bool useLastUsedProfile = false; + if (option.InheritConfig) - option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out _inputConfiguration); - + { + option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out _inputConfiguration, + out useLastUsedProfile); + } + AppDataManager.Initialize(option.BaseDataDir); + if (useLastUsedProfile && AccountSaveDataManager.GetLastUsedUser().TryGet(out var profile)) + option.UserProfile = profile.Name; + // Check if keys exists. if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys"))) { diff --git a/src/Ryujinx/Headless/Options.cs b/src/Ryujinx/Headless/Options.cs index 3a807cb42..50654dc2f 100644 --- a/src/Ryujinx/Headless/Options.cs +++ b/src/Ryujinx/Headless/Options.cs @@ -17,11 +17,10 @@ namespace Ryujinx.Headless { // General - public void InheritMainConfig(string[] originalArgs, ConfigurationState configurationState, out List inputConfigs) + public void InheritMainConfig(string[] originalArgs, ConfigurationState configurationState, out List inputConfigs, out bool needsProfileSet) { - if (NeedsOverride(nameof(UserProfile)) && AccountSaveDataManager.GetLastUsedUser().TryGet(out var profile)) - UserProfile = profile.Name; - + needsProfileSet = NeedsOverride(nameof(UserProfile)); + if (NeedsOverride(nameof(IsFullscreen))) IsFullscreen = configurationState.UI.StartFullscreen; diff --git a/src/Ryujinx/Headless/WindowBase.cs b/src/Ryujinx/Headless/WindowBase.cs index f318494ce..21bee368a 100644 --- a/src/Ryujinx/Headless/WindowBase.cs +++ b/src/Ryujinx/Headless/WindowBase.cs @@ -137,7 +137,7 @@ namespace Ryujinx.Headless private void SetWindowIcon() { - Stream iconStream = typeof(WindowBase).Assembly.GetManifestResourceStream("Ryujinx.Ryujinx.bmp"); + Stream iconStream = typeof(Program).Assembly.GetManifestResourceStream("HeadlessLogo"); byte[] iconBytes = new byte[iconStream!.Length]; if (iconStream.Read(iconBytes, 0, iconBytes.Length) != iconBytes.Length) diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj index c5aafad23..d98e499c2 100644 --- a/src/Ryujinx/Ryujinx.csproj +++ b/src/Ryujinx/Ryujinx.csproj @@ -134,7 +134,7 @@ - +