0.2.1
- added running game process checking timeout
This commit is contained in:
parent
420326a8a0
commit
77f7e77aa2
2 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "anime-launcher-sdk"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
readme = "README.md"
|
||||
|
|
|
@ -161,12 +161,16 @@ pub fn run() -> anyhow::Result<()> {
|
|||
|
||||
#[allow(unused_must_use)]
|
||||
std::thread::spawn(move || {
|
||||
std::thread::sleep(std::time::Duration::from_secs(3));
|
||||
|
||||
while let Ok(output) = Command::new("ps").arg("-A").stdout(Stdio::piped()).output() {
|
||||
let output = String::from_utf8_lossy(&output.stdout);
|
||||
|
||||
if !output.contains("GenshinImpact.e") && !output.contains("unlocker.exe") {
|
||||
break;
|
||||
}
|
||||
|
||||
std::thread::sleep(std::time::Duration::from_secs(3));
|
||||
}
|
||||
|
||||
rpc.update(RpcUpdates::Disconnect);
|
||||
|
|
Loading…
Reference in a new issue