aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.rs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-11 00:32:55 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-11 00:32:55 +0200
commit504c1bc00e9d27a3df9a300ba2ebd8aa9efbb3ab (patch)
treebb3785aa3f4f8d03c1e245e73c8435b06c69c1ce /src-tauri/src/lib.rs
parent6097f17765e5f4303a25f58e1ad07b5dbb79233b (diff)
downloadFlightCore-504c1bc00e9d27a3df9a300ba2ebd8aa9efbb3ab.tar.gz
FlightCore-504c1bc00e9d27a3df9a300ba2ebd8aa9efbb3ab.zip
Check if Origin 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 9a3cd471..61b4fb65 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -288,3 +288,14 @@ pub fn launch_northstar(game_install: GameInstall) -> Result<String, String> {
get_host_os()
))
}
+
+use sysinfo::{System, SystemExt};
+pub fn check_origin_running() -> bool {
+ let s = System::new_all();
+ for _process in s.processes_by_name("Origin.exe") {
+ // check here if this is your process
+ // dbg!(process);
+ return true;
+ }
+ false
+}