aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs
diff options
context:
space:
mode:
authorIsaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com>2024-02-11 02:09:18 +0000
committerGitHub <noreply@github.com>2024-02-11 03:09:18 +0100
commitf06d22d6f01e657ebbc0c8ef082739cd468e47b5 (patch)
treec10a566438d3801b33c1d7b4eff73ea62b2f1a63 /src/Ryujinx.Ui.Common/Helper/CommandLineState.cs
parent84d6e8d121a1b329d26cc0e462aadd1108d99a04 (diff)
Infra: Capitalisation Consistency (#6296)
* Rename Ryujinx.UI.Common * Rename Ryujinx.UI.LocaleGenerator * Update in Files AboutWindow * Configuration State * Rename projects * Ryujinx/UI * Fix build * Main remaining inconsistencies * HLE.UI Namespace * HLE.UI Files * Namespace * Ryujinx.UI.Common.Configuration.UI * Ryujinx.UI.Common,Configuration.UI Files * More instances
Diffstat (limited to 'src/Ryujinx.Ui.Common/Helper/CommandLineState.cs')
-rw-r--r--src/Ryujinx.Ui.Common/Helper/CommandLineState.cs99
1 files changed, 0 insertions, 99 deletions
diff --git a/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs b/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs
deleted file mode 100644
index 714cf2f0..00000000
--- a/src/Ryujinx.Ui.Common/Helper/CommandLineState.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-using Ryujinx.Common.Logging;
-using System.Collections.Generic;
-
-namespace Ryujinx.Ui.Common.Helper
-{
- public static class CommandLineState
- {
- public static string[] Arguments { get; private set; }
-
- 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; }
- public static bool StartFullscreenArg { get; private set; }
-
- public static void ParseArguments(string[] args)
- {
- List<string> arguments = new();
-
- // Parse Arguments.
- for (int i = 0; i < args.Length; ++i)
- {
- string arg = args[i];
-
- switch (arg)
- {
- case "-r":
- case "--root-data-dir":
- if (i + 1 >= args.Length)
- {
- Logger.Error?.Print(LogClass.Application, $"Invalid option '{arg}'");
-
- continue;
- }
-
- BaseDirPathArg = args[++i];
-
- arguments.Add(arg);
- arguments.Add(args[i]);
- break;
- case "-p":
- case "--profile":
- if (i + 1 >= args.Length)
- {
- Logger.Error?.Print(LogClass.Application, $"Invalid option '{arg}'");
-
- continue;
- }
-
- Profile = args[++i];
-
- arguments.Add(arg);
- arguments.Add(args[i]);
- break;
- case "-f":
- case "--fullscreen":
- StartFullscreenArg = true;
-
- arguments.Add(arg);
- break;
- case "-g":
- case "--graphics-backend":
- if (i + 1 >= args.Length)
- {
- Logger.Error?.Print(LogClass.Application, $"Invalid option '{arg}'");
-
- continue;
- }
-
- OverrideGraphicsBackend = args[++i];
- break;
- case "--docked-mode":
- OverrideDockedMode = true;
- break;
- 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;
- }
- }
-
- Arguments = arguments.ToArray();
- }
- }
-}