scythe/scratch/ui_cli.patch

21 lines
595 B
Diff

--- src/bin/vrec-ui.rs
+++ src/bin/vrec-ui.rs
@@ -16,6 +16,19 @@
}
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
+ let args: Vec<String> = env::args().collect();
+ if args.len() > 1 {
+ match args[1].as_str() {
+ "--save" => {
+ return send_command(Command::SaveReplay).map_err(|e| e.into());
+ }
+ "--menu" => {
+ vrec::overlay::show_saved_overlay();
+ return Ok(());
+ }
+ _ => {}
+ }
+ }
+
println!("Starting vrec UI/Hotkey process...");