Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d3a6a8f66e | |||
| 12a506a644 | |||
| 6f56690c1c | |||
| 1398dad67c | |||
| 2fc58d58a5 |
@@ -87,19 +87,8 @@ namespace Ryujinx.Headless
|
|||||||
// Initialize Discord integration.
|
// Initialize Discord integration.
|
||||||
DiscordIntegrationModule.Initialize();
|
DiscordIntegrationModule.Initialize();
|
||||||
|
|
||||||
ReloadConfig();
|
|
||||||
|
|
||||||
// Logging system information.
|
// Logging system information.
|
||||||
Program.PrintSystemInfo();
|
Program.PrintSystemInfo();
|
||||||
|
|
||||||
// Check if keys exists.
|
|
||||||
if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys")))
|
|
||||||
{
|
|
||||||
if (!(AppDataManager.Mode == AppDataManager.LaunchMode.UserProfile && File.Exists(Path.Combine(AppDataManager.KeysDirPathUser, "prod.keys"))))
|
|
||||||
{
|
|
||||||
Logger.Error?.Print(LogClass.Application, "Keys not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Entrypoint(string[] args)
|
public static void Entrypoint(string[] args)
|
||||||
@@ -152,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;
|
||||||
}
|
}
|
||||||
@@ -160,10 +153,6 @@ namespace Ryujinx.Headless
|
|||||||
{
|
{
|
||||||
configurationPath = appDataConfigurationPath;
|
configurationPath = appDataConfigurationPath;
|
||||||
}
|
}
|
||||||
else if (File.Exists(customConfigPath))
|
|
||||||
{
|
|
||||||
configurationPath = customConfigPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (configurationPath == null)
|
if (configurationPath == null)
|
||||||
{
|
{
|
||||||
@@ -423,11 +412,30 @@ namespace Ryujinx.Headless
|
|||||||
{
|
{
|
||||||
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.
|
||||||
|
if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys")))
|
||||||
|
{
|
||||||
|
if (!(AppDataManager.Mode == AppDataManager.LaunchMode.UserProfile && File.Exists(Path.Combine(AppDataManager.KeysDirPathUser, "prod.keys"))))
|
||||||
|
{
|
||||||
|
Logger.Error?.Print(LogClass.Application, "Keys not found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ReloadConfig();
|
||||||
|
|
||||||
_virtualFileSystem = VirtualFileSystem.CreateInstance();
|
_virtualFileSystem = VirtualFileSystem.CreateInstance();
|
||||||
_libHacHorizonManager = new LibHacHorizonManager();
|
_libHacHorizonManager = new LibHacHorizonManager();
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -137,7 +137,7 @@ namespace Ryujinx.Headless
|
|||||||
|
|
||||||
private void SetWindowIcon()
|
private void SetWindowIcon()
|
||||||
{
|
{
|
||||||
Stream iconStream = typeof(WindowBase).Assembly.GetManifestResourceStream("Ryujinx.Headless.SDL2.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)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
PreviewerDetached = true;
|
PreviewerDetached = true;
|
||||||
|
|
||||||
if (args[0] is "--no-gui" or "nogui")
|
if (args.Length > 0 && args[0] is "--no-gui" or "nogui")
|
||||||
{
|
{
|
||||||
HeadlessRyujinx.Entrypoint(args[1..]);
|
HeadlessRyujinx.Entrypoint(args[1..]);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user