fix: added compatibility checks with v1.0.4

This commit is contained in:
Davide Passoni
2025-03-07 16:39:33 +01:00
parent f1fb3073d2
commit d90ef540f9
4 changed files with 25 additions and 16 deletions

View File

@@ -186,8 +186,12 @@ class DCSInstance {
this.backendPort = config["backend"]["port"];
this.backendAddress = config["backend"]["address"];
this.gameMasterPasswordHash = config["authentication"]["gameMasterPassword"];
this.autoconnectWhenLocal = config["frontend"]["autoconnectWhenLocal"];
this.SRSPort = config["audio"]["SRSPort"];
/* Read the new configurations added in v2.0.0 */
if ( config["frontend"]["autoconnectWhenLocal"] !== undefined)
this.autoconnectWhenLocal = config["frontend"]["autoconnectWhenLocal"];
if (config["frontend"]["audio"] !== undefined && config["frontend"]["audio"]["SRSPort"] !== undefined)
this.SRSPort = config["audio"]["SRSPort"];
this.gameMasterPasswordEdited = false;
this.blueCommanderPasswordEdited = false;