From 1398dad67ce65aaf32db9e62eb9a3ee06e03b0e0 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Wed, 11 Dec 2024 15:01:28 -0600 Subject: [PATCH] hia: fix 2 crashes --- src/Ryujinx/Headless/HeadlessRyujinx.cs | 10 +++++----- src/Ryujinx/Program.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Ryujinx/Headless/HeadlessRyujinx.cs b/src/Ryujinx/Headless/HeadlessRyujinx.cs index b2941b884..4135a3e38 100644 --- a/src/Ryujinx/Headless/HeadlessRyujinx.cs +++ b/src/Ryujinx/Headless/HeadlessRyujinx.cs @@ -87,8 +87,6 @@ namespace Ryujinx.Headless // Initialize Discord integration. DiscordIntegrationModule.Initialize(); - ReloadConfig(); - // Logging system information. Program.PrintSystemInfo(); @@ -422,12 +420,14 @@ namespace Ryujinx.Headless static void Load(string[] originalArgs, Options option) { Initialize(); - + if (option.InheritConfig) option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out _inputConfiguration); - + AppDataManager.Initialize(option.BaseDataDir); - + + ReloadConfig(); + _virtualFileSystem = VirtualFileSystem.CreateInstance(); _libHacHorizonManager = new LibHacHorizonManager(); diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index fbeca3fc8..944ac6078 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -54,7 +54,7 @@ namespace Ryujinx.Ava 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..]); return 0;