From 686d7b8237a460a51b6ff062607558876f769706 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Fri, 31 Dec 2021 10:44:50 -0800 Subject: [PATCH] added delays so commands don't overlap --- src/modules/external_interface.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/external_interface.rs b/src/modules/external_interface.rs index 802d67c..2fdb52d 100644 --- a/src/modules/external_interface.rs +++ b/src/modules/external_interface.rs @@ -48,6 +48,7 @@ impl Hotkeys { hotkey]) .spawn() .expect("next_slide process call failed"); + std::thread::sleep(std::time::Duration::from_millis(400)); } else { println!("pretend linux is sending obs send: {}", hotkey) }; @@ -60,6 +61,7 @@ impl Hotkeys { self.hotkeys["general"]["clicker_forward"].as_str().unwrap()]) .spawn() .expect("next_slide process call failed"); + std::thread::sleep(std::time::Duration::from_millis(200)); } else { println!("pretend linux is sending prosenter next: {}", self.hotkeys["general"]["clicker_forward"].as_str().unwrap()) }; @@ -72,6 +74,7 @@ impl Hotkeys { self.hotkeys["general"]["clicker_backward"].as_str().unwrap()]) .spawn() .expect("next_slide process call failed"); + std::thread::sleep(std::time::Duration::from_millis(200)); } else { println!("pretend linux is sending prosenter next: {}", self.hotkeys["general"]["clicker_backward"].as_str().unwrap()) };