From 47c9ea288b97e1c11baaadde7cc24d6704d8ea22 Mon Sep 17 00:00:00 2001 From: Rémy Raes Date: Fri, 7 Jan 2022 23:19:32 +0100 Subject: fix: Game path check (#29) * [feat] adding methods signature to alert when selected game path is falsy * [feat] a game path is valid if it contains 'Titanfall2.exe' file * [feat] adding translations for wrong gamepath key * [feat] if a wrong path has been selected, ask for it again * formatting and removing useless function Given we only use checkGamePath() once there's no need to even have a function for it. Co-authored-by: 0neGal --- src/app/main.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/app') diff --git a/src/app/main.js b/src/app/main.js index aa2ba68..00d3551 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -84,6 +84,11 @@ ipcRenderer.on("nopathselected", () => { exit(); }); +ipcRenderer.on("wrongpath", () => { + alert(lang("gui.gamepath.wrong")); + setpath(false); +}); + setlang(); setInterval(() => { ipcRenderer.send("setsize", document.querySelector(".lines").offsetHeight + 20); -- cgit v1.2.3