aboutsummaryrefslogtreecommitdiff
path: root/src/app/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/main.js')
-rw-r--r--src/app/main.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 0c48db1..1fdaa00 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -3,6 +3,7 @@ const path = require("path");
const { ipcRenderer } = require("electron");
const lang = require("../lang");
+let shouldInstallNorthstar = false;
var settings = {
gamepath: "",
@@ -43,7 +44,14 @@ function setpath(value = false) {
ipcRenderer.send("setpath", value);
}
-function launch() {ipcRenderer.send("launch")}
+function launch() {
+ if (shouldInstallNorthstar) {
+ update();
+ shouldInstallNorthstar = false;
+ } else {
+ ipcRenderer.send("launch");
+ }
+}
function launchVanilla() {ipcRenderer.send("launchVanilla")}
function log(msg) {
@@ -153,6 +161,7 @@ ipcRenderer.on("version", (event, versions) => {
// Since Northstar is not installed, we cannot launch it
northstar.innerText = 'Install';
+ shouldInstallNorthstar = true;
}
}); ipcRenderer.send("getversion");