mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +02:00
Added --backend-threading arg for CommandLineState
Added the `--backend-threading` arg so that you can launch games via a shortcut with modifications to this setting.
This commit is contained in:
committed by
KeatonTheBot
parent
727ac79ebc
commit
628a28290f
@@ -11,6 +11,7 @@ namespace Ryujinx.UI.Common.Helper
|
|||||||
public static bool? OverrideDockedMode { get; private set; }
|
public static bool? OverrideDockedMode { get; private set; }
|
||||||
public static bool? OverrideHardwareAcceleration { get; private set; }
|
public static bool? OverrideHardwareAcceleration { get; private set; }
|
||||||
public static string OverrideGraphicsBackend { get; private set; }
|
public static string OverrideGraphicsBackend { get; private set; }
|
||||||
|
public static string OverrideBackendThreading { get; private set; }
|
||||||
public static string OverrideHideCursor { get; private set; }
|
public static string OverrideHideCursor { get; private set; }
|
||||||
public static string BaseDirPathArg { get; private set; }
|
public static string BaseDirPathArg { get; private set; }
|
||||||
public static string Profile { get; private set; }
|
public static string Profile { get; private set; }
|
||||||
@@ -76,6 +77,16 @@ namespace Ryujinx.UI.Common.Helper
|
|||||||
|
|
||||||
OverrideGraphicsBackend = args[++i];
|
OverrideGraphicsBackend = args[++i];
|
||||||
break;
|
break;
|
||||||
|
case "--backend-threading":
|
||||||
|
if (i + 1 >= args.Length)
|
||||||
|
{
|
||||||
|
Logger.Error?.Print(LogClass.Application, $"Invalid option '{arg}'");
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
OverrideBackendThreading = args[++i];
|
||||||
|
break;
|
||||||
case "-i":
|
case "-i":
|
||||||
case "--application-id":
|
case "--application-id":
|
||||||
LaunchApplicationId = args[++i];
|
LaunchApplicationId = args[++i];
|
||||||
|
|||||||
@@ -196,6 +196,16 @@ namespace Ryujinx.Ava
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if backend threading was overridden
|
||||||
|
if (CommandLineState.OverrideBackendThreading is not null)
|
||||||
|
ConfigurationState.Instance.Graphics.BackendThreading.Value = CommandLineState.OverrideBackendThreading.ToLower() switch
|
||||||
|
{
|
||||||
|
"auto" => BackendThreading.Auto,
|
||||||
|
"off" => BackendThreading.Off,
|
||||||
|
"on" => BackendThreading.On,
|
||||||
|
_ => ConfigurationState.Instance.Graphics.BackendThreading
|
||||||
|
};
|
||||||
|
|
||||||
// Check if docked mode was overriden.
|
// Check if docked mode was overriden.
|
||||||
if (CommandLineState.OverrideDockedMode.HasValue)
|
if (CommandLineState.OverrideDockedMode.HasValue)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user