forked from amkovkov/GranuSightSoftware2
feat: command line debug option
This commit is contained in:
+16
-11
@@ -19,6 +19,21 @@ public partial class Program
|
||||
{
|
||||
Description = "Run in fullscreen mode"
|
||||
};
|
||||
private static readonly Option<bool> _debug = new Option<bool>("--debug")
|
||||
{
|
||||
Description = "Wait debugger attach on launch",
|
||||
Hidden = true
|
||||
};
|
||||
private static readonly Option<RenderingMode> _renderingMode = new("--rendering-mode")
|
||||
{
|
||||
Description = "Rendering mode to use",
|
||||
DefaultValueFactory = (_) => RenderingMode.X11
|
||||
};
|
||||
private static readonly Option<bool> _hideConsole = new("--hide-console")
|
||||
{
|
||||
Description = "Suppress console output",
|
||||
DefaultValueFactory = (result) => result.GetRequiredValue(_renderingMode) == RenderingMode.DRM
|
||||
};
|
||||
|
||||
private static readonly Command _cameraTuningCommand = new("camera-tuning")
|
||||
{
|
||||
@@ -80,17 +95,6 @@ public partial class Program
|
||||
DefaultValueFactory = (_) => 0
|
||||
};
|
||||
|
||||
private static readonly Option<RenderingMode> _renderingMode = new("--rendering-mode")
|
||||
{
|
||||
Description = "Rendering mode to use",
|
||||
DefaultValueFactory = (_) => RenderingMode.X11
|
||||
};
|
||||
private static readonly Option<bool> _hideConsole = new("--hide-console")
|
||||
{
|
||||
Description = "Suppress console output",
|
||||
DefaultValueFactory = (result) => result.GetRequiredValue(_renderingMode) == RenderingMode.DRM
|
||||
};
|
||||
|
||||
public static event ConsoleCancelEventHandler? ShutdownRequested;
|
||||
|
||||
[STAThread]
|
||||
@@ -100,6 +104,7 @@ public partial class Program
|
||||
|
||||
_rootCommand.SetAction(Ui);
|
||||
_rootCommand.Add(_fullscreen);
|
||||
_rootCommand.Add(_debug);
|
||||
_rootCommand.Add(_renderingMode);
|
||||
_rootCommand.Add(_hideConsole);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user