mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +02:00
Headless in Avalonia v2
Launch the Ryujinx.exe, first argument --no-gui or nogui, and the rest of the arguments should be your normal headless script. You can include the new option --use-main-config which will provide any arguments that you don't, filled in from your main config made by the UI.
This commit is contained in:
committed by
KeatonTheBot
parent
fbcf57bef5
commit
88d904acde
+12
-5
@@ -8,6 +8,7 @@ using Ryujinx.Common.GraphicsDriver;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common.SystemInterop;
|
||||
using Ryujinx.Graphics.Vulkan.MoltenVK;
|
||||
using Ryujinx.Headless;
|
||||
using Ryujinx.Modules;
|
||||
using Ryujinx.SDL2.Common;
|
||||
using Ryujinx.UI.Common;
|
||||
@@ -46,9 +47,15 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
|
||||
PreviewerDetached = true;
|
||||
|
||||
if (args.Length > 0 && args[0] is "--no-gui" or "nogui")
|
||||
{
|
||||
HeadlessRyujinx.Entrypoint(args[1..]);
|
||||
return;
|
||||
}
|
||||
|
||||
Initialize(args);
|
||||
|
||||
|
||||
LoggerAdapter.Register();
|
||||
|
||||
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||
@@ -98,7 +105,7 @@ namespace Ryujinx.Ava
|
||||
TaskScheduler.UnobservedTaskException += (sender, e)
|
||||
=> ProcessUnhandledException(e.Exception, false);
|
||||
AppDomain.CurrentDomain.ProcessExit += (sender, e) => Exit();
|
||||
|
||||
|
||||
// Setup base data directory.
|
||||
AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
|
||||
|
||||
@@ -234,7 +241,7 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
}
|
||||
|
||||
private static void PrintSystemInfo()
|
||||
internal static void PrintSystemInfo()
|
||||
{
|
||||
Logger.Notice.Print(LogClass.Application, $"Ryujinx Version: {Version}");
|
||||
Logger.Notice.Print(LogClass.Application, $".NET Runtime: {RuntimeInformation.FrameworkDescription}");
|
||||
@@ -252,7 +259,7 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
}
|
||||
|
||||
private static void ProcessUnhandledException(Exception ex, bool isTerminating)
|
||||
internal static void ProcessUnhandledException(Exception ex, bool isTerminating)
|
||||
{
|
||||
string message = $"Unhandled exception caught: {ex}";
|
||||
|
||||
@@ -269,7 +276,7 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
}
|
||||
|
||||
public static void Exit()
|
||||
internal static void Exit()
|
||||
{
|
||||
DiscordIntegrationModule.Exit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user