From a67583a22ce8a6ff73654e480a04d4ad9daf324a Mon Sep 17 00:00:00 2001 From: Nova Date: Tue, 27 Sep 2022 15:21:22 -0400 Subject: [PATCH] feat(main): better overlay control --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index e223909..6a7fff6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,12 +25,12 @@ use tokio::{runtime::Handle, sync::oneshot}; #[clap(author, version, about, long_about = None)] struct CliArgs { /// Force flatscreen mode and use the mouse pointer as a 3D pointer - #[clap(short, action)] + #[clap(short, long, action)] flatscreen: bool, - /// Run Stardust XR as an overlay - #[clap(short, action)] - overlay: bool, + /// Run Stardust XR as an overlay with given priority + #[clap(id = "PRIORITY", short = 'o', long = "overlay", action)] + overlay_priority: Option, } fn main() -> Result<()> { @@ -41,8 +41,8 @@ fn main() -> Result<()> { let mut stereokit = Settings::default() .app_name("Stardust XR") - .overlay_app(cli_args.overlay) - .overlay_priority(u32::MAX) + .overlay_app(cli_args.overlay_priority.is_some()) + .overlay_priority(cli_args.overlay_priority.unwrap_or(u32::MAX)) .disable_desktop_input_window(true) .display_preference(if cli_args.flatscreen { DisplayMode::Flatscreen