Skip to content

Commit

Permalink
fixed Northstar startup arguments not applying
Browse files Browse the repository at this point in the history
  • Loading branch information
0neGal committed Aug 7, 2023
1 parent 5a4f401 commit 4dce627
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/modules/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ settings.save = (obj = {}) => {

delete settings_content.save;

// write Northstar's startup argument file
if (fs.existsSync(settings.gamepath)) {
fs.writeFileSync(path.join(settings.gamepath, "ns_startup_args.txt"), settings.nsargs);
}

let stringified_settings = JSON.stringify({
...settings, ...obj
})
Expand All @@ -83,6 +78,16 @@ settings.save = (obj = {}) => {

// write the settings file
fs.writeFileSync(settings_file, stringified_settings);

// set the settings obj for the main process
settings = settings_content;

// write Northstar's startup arguments file
if (fs.existsSync(settings.gamepath)) {
fs.writeFileSync(path.join(
settings.gamepath, "ns_startup_args.txt"
), settings.nsargs);
}
}

module.exports = settings;

0 comments on commit 4dce627

Please sign in to comment.