From cbcaafa35624c70e313c00232f78a366d05ef3a9 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Wed, 13 Apr 2022 23:22:42 +0200 Subject: check to make sure gamepath exists When Viper starts up it'll check to make sure the gamepath still exists, and throws errors if not, it also redirects you to the first page (the one where you can set the gamepath), and gives you an informative error. This could happen because the user unmounted the drive the gamepath is on, or it could happen if the user moved their game location. --- src/app/main.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/app') diff --git a/src/app/main.js b/src/app/main.js index 9218ec7..70d1b0c 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -83,11 +83,17 @@ function setButtons(state) { } } + disablearray(document.querySelectorAll(".playBtnContainer .playBtn")) disablearray(document.querySelectorAll("#nsMods .buttons.modbtns button")) disablearray(document.querySelectorAll("#browser #browserEntries .text button")) } ipcRenderer.on("setbuttons", (event, state) => {setButtons(state)}) +ipcRenderer.on("gamepathlost", (event, state) => { + page(0); + setButtons(false); + alert(lang("gui.gamepath.lost")); +}) // Frontend part of updating Northstar ipcRenderer.on("ns-update-event", (event, key) => { -- cgit v1.2.3