mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 22:45:46 +00:00
hia: Fix last used profile loading, (hopefully) fixed logo loading
This commit is contained in:
parent
12a506a644
commit
d3a6a8f66e
4 changed files with 21 additions and 14 deletions
|
@ -141,7 +141,11 @@ namespace Ryujinx.Headless
|
||||||
string configurationPath = null;
|
string configurationPath = null;
|
||||||
|
|
||||||
// Now load the configuration as the other subsystems are now registered
|
// 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;
|
configurationPath = localConfigurationPath;
|
||||||
}
|
}
|
||||||
|
@ -149,10 +153,6 @@ namespace Ryujinx.Headless
|
||||||
{
|
{
|
||||||
configurationPath = appDataConfigurationPath;
|
configurationPath = appDataConfigurationPath;
|
||||||
}
|
}
|
||||||
else if (customConfigPath != null && File.Exists(customConfigPath))
|
|
||||||
{
|
|
||||||
configurationPath = customConfigPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (configurationPath == null)
|
if (configurationPath == null)
|
||||||
{
|
{
|
||||||
|
@ -411,12 +411,20 @@ namespace Ryujinx.Headless
|
||||||
static void Load(string[] originalArgs, Options option)
|
static void Load(string[] originalArgs, Options option)
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
||||||
|
bool useLastUsedProfile = false;
|
||||||
|
|
||||||
if (option.InheritConfig)
|
if (option.InheritConfig)
|
||||||
option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out _inputConfiguration);
|
{
|
||||||
|
option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out _inputConfiguration,
|
||||||
|
out useLastUsedProfile);
|
||||||
|
}
|
||||||
|
|
||||||
AppDataManager.Initialize(option.BaseDataDir);
|
AppDataManager.Initialize(option.BaseDataDir);
|
||||||
|
|
||||||
|
if (useLastUsedProfile && AccountSaveDataManager.GetLastUsedUser().TryGet(out var profile))
|
||||||
|
option.UserProfile = profile.Name;
|
||||||
|
|
||||||
// Check if keys exists.
|
// Check if keys exists.
|
||||||
if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys")))
|
if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys")))
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,11 +17,10 @@ namespace Ryujinx.Headless
|
||||||
{
|
{
|
||||||
// General
|
// General
|
||||||
|
|
||||||
public void InheritMainConfig(string[] originalArgs, ConfigurationState configurationState, out List<InputConfig> inputConfigs)
|
public void InheritMainConfig(string[] originalArgs, ConfigurationState configurationState, out List<InputConfig> inputConfigs, out bool needsProfileSet)
|
||||||
{
|
{
|
||||||
if (NeedsOverride(nameof(UserProfile)) && AccountSaveDataManager.GetLastUsedUser().TryGet(out var profile))
|
needsProfileSet = NeedsOverride(nameof(UserProfile));
|
||||||
UserProfile = profile.Name;
|
|
||||||
|
|
||||||
if (NeedsOverride(nameof(IsFullscreen)))
|
if (NeedsOverride(nameof(IsFullscreen)))
|
||||||
IsFullscreen = configurationState.UI.StartFullscreen;
|
IsFullscreen = configurationState.UI.StartFullscreen;
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace Ryujinx.Headless
|
||||||
|
|
||||||
private void SetWindowIcon()
|
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];
|
byte[] iconBytes = new byte[iconStream!.Length];
|
||||||
|
|
||||||
if (iconStream.Read(iconBytes, 0, iconBytes.Length) != iconBytes.Length)
|
if (iconStream.Read(iconBytes, 0, iconBytes.Length) != iconBytes.Length)
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_JoyConPair.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_JoyConPair.svg" />
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_JoyConRight.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_JoyConRight.svg" />
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_ProCon.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_ProCon.svg" />
|
||||||
<EmbeddedResource Include="Headless\Ryujinx.bmp" />
|
<EmbeddedResource Include="Headless\Ryujinx.bmp" LogicalName="HeadlessLogo" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AdditionalFiles Include="Assets\Locales\en_US.json" />
|
<AdditionalFiles Include="Assets\Locales\en_US.json" />
|
||||||
|
|
Loading…
Reference in a new issue