aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.rs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-20 15:35:49 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-20 15:35:49 +0200
commit3abf70c34f5a354afd89b10017ffda05aad4e54f (patch)
tree71da71c7aece0d8efb80747b1257d39e48f83b88 /src-tauri/src/lib.rs
parent120d6834eeeabd77cab490bfd2e6afcf889b233f (diff)
downloadFlightCore-3abf70c34f5a354afd89b10017ffda05aad4e54f.tar.gz
FlightCore-3abf70c34f5a354afd89b10017ffda05aad4e54f.zip
Periodically check if Northstar is running
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r--src-tauri/src/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index f2fef1da..9856394d 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -334,6 +334,17 @@ pub fn check_origin_running() -> bool {
false
}
+/// Checks if Northstar process is running
+pub fn check_northstar_running() -> bool {
+ let s = sysinfo::System::new_all();
+ for _process in s.processes_by_name("NorthstarLauncher.exe") {
+ // check here if this is your process
+ // dbg!(process);
+ return true;
+ }
+ false
+}
+
/// Helps with converting release candidate numbers which are different on Thunderstore
/// due to restrictions imposed by the platform
pub fn convert_release_candidate_number(version_number: String) -> String {