diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/gamepath.js | 2 | ||||
-rw-r--r-- | src/modules/is_running.js | 6 | ||||
-rw-r--r-- | src/modules/kill.js | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/gamepath.js b/src/modules/gamepath.js index 69cc446..5a5f922 100644 --- a/src/modules/gamepath.js +++ b/src/modules/gamepath.js @@ -153,7 +153,7 @@ gamepath.set = async (win, force_dialog) => { return gamepath.setting = false; } - await win().alert(lang("general.missing_path")); + await win.alert(lang("general.missing_path")); } // fallback to GUI/manual selection diff --git a/src/modules/is_running.js b/src/modules/is_running.js index b9fbde1..e2a2d96 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"; } })(); @@ -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; } |