From dd574146fb5f05c1c0a469a4ad4a20c46bb37d74 Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Tue, 2 May 2023 03:29:47 +0200 Subject: Add hide-cursor command line argument & always hide cursor option (#4613) * Add hide-cursor command line argument * gtk: Adjust SettingsWindow for hide cursor options * ava: Adjust SettingsWindow for hide cursor options * ava: Add override check for HideCursor arg * Remove copy&paste sins * ava: Leave a little more room between the options * gtk: Fix hide cursor issues * ava: Only hide cursor if it's within the embedded window --- src/Ryujinx.Ui.Common/Helper/CommandLineState.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Ryujinx.Ui.Common/Helper/CommandLineState.cs') diff --git a/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs b/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs index 8ca7fba1..660a4ce9 100644 --- a/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs +++ b/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs @@ -9,6 +9,7 @@ namespace Ryujinx.Ui.Common.Helper public static bool? OverrideDockedMode { get; private set; } public static string OverrideGraphicsBackend { get; private set; } + public static string OverrideHideCursor { get; private set; } public static string BaseDirPathArg { get; private set; } public static string Profile { get; private set; } public static string LaunchPathArg { get; private set; } @@ -76,6 +77,16 @@ namespace Ryujinx.Ui.Common.Helper case "--handheld-mode": OverrideDockedMode = false; break; + case "--hide-cursor": + if (i + 1 >= args.Length) + { + Logger.Error?.Print(LogClass.Application, $"Invalid option '{arg}'"); + + continue; + } + + OverrideHideCursor = args[++i]; + break; default: LaunchPathArg = arg; break; -- cgit v1.2.3-70-g09d2