aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-08-07 23:26:51 +0200
committer0neGal <mail@0negal.com>2023-08-07 23:26:51 +0200
commit4dce627ee4c74c16c0e4cba3d974458da4d5700d (patch)
tree4131f049f79387273b4894b6dfde1a76896b362b /src
parent5a4f401bc9363395a285e6b5e650d4f92e72d086 (diff)
downloadViper-4dce627ee4c74c16c0e4cba3d974458da4d5700d.tar.gz
Viper-4dce627ee4c74c16c0e4cba3d974458da4d5700d.zip
fixed Northstar startup arguments not applying
Diffstat (limited to 'src')
-rw-r--r--src/modules/settings.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/settings.js b/src/modules/settings.js
index 3b60d7f..3833e4f 100644
--- a/src/modules/settings.js
+++ b/src/modules/settings.js
@@ -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
})
@@ -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;