Skip to content

Commit

Permalink
fixed issue causing viper not open the GUI
Browse files Browse the repository at this point in the history
I don't really understand why or how anything broke, all I know is this
fixes it, and I don't know how to feel about this madness.
  • Loading branch information
0neGal committed Apr 17, 2022
1 parent b4226cf commit 87e7041
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@ async function setpath(win, forcedialog) {
// merge it together with the already existing settings
function saveSettings(obj = {}) {
settings = {...settings, ...obj};
fs.writeFileSync(app.getPath("appData") + "/viper.json", JSON.stringify({...settings, ...obj}));

if (! gamepathExists()) {return}
fs.writeFileSync(path.join(settings.gamepath, "ns_startup_args.txt"), settings.nsargs);
if (fs.existsSync(settings.gamepath)) {
fs.writeFileSync(path.join(settings.gamepath, "ns_startup_args.txt"), settings.nsargs);
}

fs.writeFileSync(app.getPath("appData") + "/viper.json", JSON.stringify({...settings, ...obj}));
}

// Returns the current Northstar version
Expand Down

0 comments on commit 87e7041

Please sign in to comment.