mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-21 17:40:52 +01:00
Add command line arguments to override docked mode (#4239)
* Add command line args for docked mode * Apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
parent
8c720783f5
commit
e4413542b2
3 changed files with 21 additions and 2 deletions
|
@ -6,8 +6,8 @@ using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.GraphicsDriver;
|
using Ryujinx.Common.GraphicsDriver;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.SystemInterop;
|
|
||||||
using Ryujinx.Common.SystemInfo;
|
using Ryujinx.Common.SystemInfo;
|
||||||
|
using Ryujinx.Common.SystemInterop;
|
||||||
using Ryujinx.Modules;
|
using Ryujinx.Modules;
|
||||||
using Ryujinx.SDL2.Common;
|
using Ryujinx.SDL2.Common;
|
||||||
using Ryujinx.Ui.Common;
|
using Ryujinx.Ui.Common;
|
||||||
|
@ -227,6 +227,12 @@ namespace Ryujinx.Ava
|
||||||
ConfigurationState.Instance.Graphics.GraphicsBackend.Value = GraphicsBackend.Vulkan;
|
ConfigurationState.Instance.Graphics.GraphicsBackend.Value = GraphicsBackend.Vulkan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if docked mode was overriden.
|
||||||
|
if (CommandLineState.OverrideDockedMode.HasValue)
|
||||||
|
{
|
||||||
|
ConfigurationState.Instance.System.EnableDockedMode.Value = CommandLineState.OverrideDockedMode.Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PrintSystemInfo()
|
private static void PrintSystemInfo()
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace Ryujinx.Ui.Common.Helper
|
||||||
{
|
{
|
||||||
public static string[] Arguments { get; private set; }
|
public static string[] Arguments { get; private set; }
|
||||||
|
|
||||||
|
public static bool? OverrideDockedMode { get; private set; }
|
||||||
public static string OverrideGraphicsBackend { get; private set; }
|
public static string OverrideGraphicsBackend { 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; }
|
||||||
|
@ -69,6 +70,12 @@ namespace Ryujinx.Ui.Common.Helper
|
||||||
|
|
||||||
OverrideGraphicsBackend = args[++i];
|
OverrideGraphicsBackend = args[++i];
|
||||||
break;
|
break;
|
||||||
|
case "--docked-mode":
|
||||||
|
OverrideDockedMode = true;
|
||||||
|
break;
|
||||||
|
case "--handheld-mode":
|
||||||
|
OverrideDockedMode = false;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LaunchPathArg = arg;
|
LaunchPathArg = arg;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3,8 +3,8 @@ using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.GraphicsDriver;
|
using Ryujinx.Common.GraphicsDriver;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.SystemInterop;
|
|
||||||
using Ryujinx.Common.SystemInfo;
|
using Ryujinx.Common.SystemInfo;
|
||||||
|
using Ryujinx.Common.SystemInterop;
|
||||||
using Ryujinx.Modules;
|
using Ryujinx.Modules;
|
||||||
using Ryujinx.SDL2.Common;
|
using Ryujinx.SDL2.Common;
|
||||||
using Ryujinx.Ui;
|
using Ryujinx.Ui;
|
||||||
|
@ -271,6 +271,12 @@ namespace Ryujinx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if docked mode was overriden.
|
||||||
|
if (CommandLineState.OverrideDockedMode.HasValue)
|
||||||
|
{
|
||||||
|
ConfigurationState.Instance.System.EnableDockedMode.Value = CommandLineState.OverrideDockedMode.Value;
|
||||||
|
}
|
||||||
|
|
||||||
// Logging system information.
|
// Logging system information.
|
||||||
PrintSystemInfo();
|
PrintSystemInfo();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue