From b68349f9c6896ecdaf420cd53e298f914f2e5400 Mon Sep 17 00:00:00 2001 From: exelix11 <13405476+exelix11@users.noreply.github.com> Date: Thu, 4 Jan 2024 22:02:12 +0100 Subject: [PATCH] Add a command line flag to enable software rendering --- Client/CommandLineOptions.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Client/CommandLineOptions.cs b/Client/CommandLineOptions.cs index 122ff09..c313b0f 100644 --- a/Client/CommandLineOptions.cs +++ b/Client/CommandLineOptions.cs @@ -44,6 +44,7 @@ record OptionArg(string Name, Action Handle, bool St // Advanced options new OptionArg("--decoder", (x, v) => x.RequestedDecoderName = v), + new OptionNoArg("--software-render", (x) => x.SoftwareRendering = true), // Deprecated RTSP options new OptionNoArg("--rtsp", x => x.RTSPDeprecationWarning = true), @@ -161,6 +162,8 @@ public enum StreamMode public bool LegacyPlayer; + public bool SoftwareRendering; + public void ApplyOptionOverrides() { DynamicLibraryLoader.LibLoaderOverride = LibDir; @@ -188,6 +191,9 @@ public void ApplyOptionOverrides() } Program.Options.DecoderName = RequestedDecoderName; + + if (SoftwareRendering) + Program.Options.ForceSoftwareRenderer = true; } public void PrintDeprecationWarnings() @@ -243,6 +249,7 @@ When a debugger is attached `log` is enabled by default. `--libdir` : Overrides the dynami library loading path, use only if dotnet can't locate your ffmpeg/avcoded/SDL2 libraries automatically this option effect depend on your platform, some libraries may still be handled by dotnet, it's better to use your loader path environment variable. `--debug-list` : Prints all available debug options. + `--software-render` : Launches SDL with software rendering, this runs very poorly and it is only meant as a debug option Command examples: SysDVR-Client.exe usb