Skip to content

Commit

Permalink
openvr: fix autolaunch
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Jun 14, 2024
1 parent 40383f2 commit 8fb9ef4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use clap::Parser;
use flexi_logger::{Duplicate, FileSpec, LogSpecification};

/// The lightweight desktop overlay for OpenVR and OpenXR
#[derive(Parser, Debug)]
#[derive(Default, Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
#[cfg(feature = "openvr")]
Expand Down Expand Up @@ -57,7 +57,11 @@ struct Args {
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut args = Args::parse();
let mut args = if std::env::args().skip(1).any(|a| !a.is_empty()) {
Args::parse()
} else {
Args::default()
};

if !args.multi && !ensure_single_instance(args.replace) {
println!("Looks like WlxOverlay-S is already running.");
Expand Down

0 comments on commit 8fb9ef4

Please sign in to comment.