Skip to content

Commit

Permalink
headless: Actually log the command line errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GreemDev committed Dec 7, 2024
1 parent 5fbcb1f commit eda4f43
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Ryujinx.Headless.SDL2/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommandLine;
using Gommon;
using LibHac.Tools.FsSystem;
using Ryujinx.Audio.Backends.SDL2;
using Ryujinx.Common;
Expand Down Expand Up @@ -96,8 +97,13 @@ static void Main(string[] args)
}

Parser.Default.ParseArguments<Options>(args)
.WithParsed(Load)
.WithNotParsed(errors => errors.Output());
.WithParsed(Load)
.WithNotParsed(errors =>
{
Logger.Error?.PrintMsg(LogClass.Application, "Error parsing command-line arguments:");

errors.ForEach(err => Logger.Error?.PrintMsg(LogClass.Application, $" - {err.Tag}"));
});
}

private static InputConfig HandlePlayerConfiguration(string inputProfileName, string inputId, PlayerIndex index)
Expand Down Expand Up @@ -579,8 +585,8 @@ private static Switch InitializeEmulationContext(WindowBase window, IRenderer re
options.MultiplayerLanInterfaceId,
Common.Configuration.Multiplayer.MultiplayerMode.Disabled,
false,
"",
"",
string.Empty,
string.Empty,
options.CustomVSyncInterval);

return new Switch(configuration);
Expand Down

0 comments on commit eda4f43

Please sign in to comment.