From 9b14fcb19784945ab0377ecaf731e53893260276 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 30 Apr 2024 21:51:06 +0200 Subject: fixed game sometimes not shown as running on Linux This didn't happen in all cases, so it took me until randomly discovering it recently, for me to actually realize there was a problem, and then subsequently fixing it. --- src/modules/is_running.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/is_running.js') diff --git a/src/modules/is_running.js b/src/modules/is_running.js index b9fbde1..9e45574 100644 --- a/src/modules/is_running.js +++ b/src/modules/is_running.js @@ -25,7 +25,7 @@ async function check_processes(processes) { // thing. And it's not much more clunky. let cmd = (() => { switch (process.platform) { - case "linux": return "ps a"; + case "linux": return "ps aux"; case "win32": return "tasklist"; } })(); -- cgit v1.2.3 From 7d9ee3a1276cf744d1a5ecd0e1bc53d61dc05935 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 30 Apr 2024 21:54:01 +0200 Subject: fixed killing EA Desktop at times failing on Linux Pesky EA Desktop being annoying as always, leaving behind processes, to be fair, I don't exactly think you're supposed to be killing it it like this, but oh well, it seems to function now. --- src/modules/is_running.js | 4 +++- src/modules/kill.js | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/modules/is_running.js') diff --git a/src/modules/is_running.js b/src/modules/is_running.js index 9e45574..e2a2d96 100644 --- a/src/modules/is_running.js +++ b/src/modules/is_running.js @@ -53,7 +53,9 @@ is_running.game = () => { is_running.origin = () => { return check_processes([ "Origin.exe", - "EADesktop.exe" + "EADesktop.exe", + "CrBrowserMain", + "EABackgroundSer" ]) } diff --git a/src/modules/kill.js b/src/modules/kill.js index 43eda23..5d03218 100644 --- a/src/modules/kill.js +++ b/src/modules/kill.js @@ -33,6 +33,12 @@ kill.origin = async () => { let origin = await kill("Origin.exe"); let eadesktop = await kill("EADesktop.exe"); + // these should be Linux only, and the above shouldn't succeed if + // these don't succeed, so we shouldn't have to check whether these + // actually succeeded or not + await kill("CrBrowserMain"); + await kill("EABackgroundSer"); + if (origin || eadesktop) { return true; } -- cgit v1.2.3