Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ignore NS dedicated server for game running check #562

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
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
Ombrezz marked this conversation as resolved.
Show resolved Hide resolved
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"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to #562 (comment) I think, process name was changed in this PR while it shouldn't have been modified:

Suggested change
if (process.name().ends_with("Titanfall2.exe") || process.name().ends_with("Northstar.exe"))
if (process.name().ends_with("Titanfall2.exe") || process.name().ends_with("NorthstarLauncher.exe"))

&& !process.cmd().contains(&String::from("-dedicated"))
{
return true;
}
}
false
}

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