Skip to content

Commit

Permalink
Fixed an issue where a command terminal window would flash open and c…
Browse files Browse the repository at this point in the history
…lose every time a game started or stopped idling
  • Loading branch information
zevnda committed Aug 20, 2024
1 parent 3f8a223 commit abe57a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions latest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version": "1.3.3",
"version": "1.3.4",
"platforms": {
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUSDh2NGF3cDBSMGpLUWxndXVvUlpLTDFpVW9kSzFPT2xyY3Z3MU1qUW1JYXNLWEVacDUxZkVPRk4wSzFQcmFDRmpmWDgzajViVE11eHMzRlR3UGNmS3FaL0pOSkdnM1EwPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzI0MDcwNDI1CWZpbGU6U3RlYW0gR2FtZSBJZGxlcl8xLjMuM194NjRfZW4tVVMubXNpLnppcApnZFpmZkdBNXhJRTJFdVc2azZ4c3hqaWFpQlczSnBsS0E0RVBEcW1KWGdxM2JoZEkrREp3Nzl6MXZzS0lKRFFPanhBUWFQSmh5NWI3TkJabHF3bzZEdz09Cg==",
"url": "https://github.com/ProbablyRaging/steam-game-idler/releases/download/1.3.3/Steam.Game.Idler_1.3.3_x64_en-US.msi.zip"
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUSDh2NGF3cDBSMHF1TjhnbkVPV05sbXNrRkJlNnFHSnB1MFVVVW5JVWs5SjFRNHl6aUVKRVZXN3RLYkExdm0vTGU4Q0RZRXRtbUF3czNzUWJnZVRjU3MrK01LRUk1cWd3PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzI0MTQwOTk5CWZpbGU6U3RlYW0gR2FtZSBJZGxlcl8xLjMuNF94NjRfZW4tVVMubXNpLnppcApFWHp2aHRCdTVoV3dqQVlQLzFJT0lPQWJ3WCs0V0h3anNqQjJHVlQ5Q0RCekVOWEZQTXYvTHVKQmdHeFFSQzd2MGx1RTdXbzNXNk5WS0hYODBUOEtDQT09Cg==",
"url": "https://github.com/ProbablyRaging/steam-game-idler/releases/download/1.3.4/Steam.Game.Idler_1.3.4_x64_en-US.msi.zip"
}
}
}
3 changes: 3 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fn check_status() -> bool {
fn start_idle(file_path: String, app_id: String, quiet: String) -> Result<(), String> {
std::process::Command::new(file_path)
.args(&[&app_id, &quiet])
.creation_flags(0x08000000)
.spawn()
.map_err(|e| e.to_string())?;
Ok(())
Expand All @@ -57,6 +58,7 @@ fn start_idle(file_path: String, app_id: String, quiet: String) -> Result<(), St
fn stop_idle(app_id: String) -> Result<(), String> {
let wmic_output = std::process::Command::new("wmic")
.args(&["process", "get", "processid,commandline"])
.creation_flags(0x08000000)
.output()
.expect("failed to get process");
let wmic_stdout = String::from_utf8_lossy(&wmic_output.stdout);
Expand All @@ -66,6 +68,7 @@ fn stop_idle(app_id: String) -> Result<(), String> {
.ok_or_else(|| "No matching process found".to_string())?;
std::process::Command::new("taskkill")
.args(&["/F", "/PID", pid])
.creation_flags(0x08000000)
.output()
.expect("failed to kill process");
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"package": {
"productName": "Steam Game Idler",
"version": "1.3.3"
"version": "1.3.4"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit abe57a2

Please sign in to comment.