aboutsummaryrefslogtreecommitdiff
path: root/src/modules/launch.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-02-03 19:15:29 +0100
committer0neGal <mail@0negal.com>2024-02-03 19:21:23 +0100
commit159e2f981bdbfd6a0589639424155d34b7a4cc91 (patch)
treeb3c1dfa3aaeb989b88abea6c9fc927c5dad3c2f9 /src/modules/launch.js
parent647bd1f6a76c834b3db9b70005f4b8365d1ded91 (diff)
downloadViper-159e2f981bdbfd6a0589639424155d34b7a4cc91.tar.gz
Viper-159e2f981bdbfd6a0589639424155d34b7a4cc91.zip
src/modules/settings.js now provides a function
This fixes a couple issues where the main process wouldn't actually get changes made to the settings, this fixes that. On top of this, changing settings is now done with `settings.set()` There shouldn't be any breakage from this change, but I suppose it is possible. Especially because the `settings()` function still does contain backup options set, meaning `settings.nsargs` is technically still valid, but dont expect it to actually be updated when that variable is changed, its merely here to avoid any problems.
Diffstat (limited to 'src/modules/launch.js')
-rw-r--r--src/modules/launch.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/launch.js b/src/modules/launch.js
index 9238336..bb094e9 100644
--- a/src/modules/launch.js
+++ b/src/modules/launch.js
@@ -22,23 +22,23 @@ function launch(game_version) {
}
// change current directory to gamepath
- process.chdir(settings.gamepath);
+ process.chdir(settings().gamepath);
- let launch_args = settings.nsargs || "";
+ let launch_args = settings().nsargs || "";
// launch the requested game version
switch(game_version) {
case "vanilla":
console.info(lang("general.launching"), "Vanilla...");
exec("Titanfall2.exe " + launch_args, {
- cwd: settings.gamepath
+ cwd: settings().gamepath
})
break;
default:
console.info(lang("general.launching"), "Northstar...");
exec("NorthstarLauncher.exe " + launch_args, {
- cwd: settings.gamepath
+ cwd: settings().gamepath
})
break;