diff options
author | 0neGal <mail@0negal.com> | 2024-02-03 19:15:29 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-02-03 19:21:23 +0100 |
commit | 159e2f981bdbfd6a0589639424155d34b7a4cc91 (patch) | |
tree | b3c1dfa3aaeb989b88abea6c9fc927c5dad3c2f9 /src/modules/launch.js | |
parent | 647bd1f6a76c834b3db9b70005f4b8365d1ded91 (diff) | |
download | Viper-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.js | 8 |
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; |