Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only count Northstar as running if it's not a dedicated server.
  • Loading branch information
Ombrezz committed Sep 13, 2023
1 parent 2a2c2b2 commit 3f07daf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src-tauri/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ pub fn check_ea_app_or_origin_running() -> bool {
/// Checks if Northstar process is running
pub fn check_northstar_running() -> bool {
let s = sysinfo::System::new_all();
let x = s
.processes_by_name("NorthstarLauncher.exe")
.next()
.is_some()
|| s.processes_by_name("Titanfall2.exe").next().is_some();
x
for (_, process) in s.processes() {
if (process.name().ends_with("Titanfall2.exe") || process.name().ends_with("Northstar.exe"))
&& !process.cmd().contains(&String::from("-dedicated"))
{
return true;
}
}
false
}

/// Copies a folder and all its contents to a new location
Expand Down

0 comments on commit 3f07daf

Please sign in to comment.