From a9c5197076c2b210ec102e84e7bedace9d12d17c Mon Sep 17 00:00:00 2001 From: hawkeye116477 Date: Wed, 3 Apr 2024 20:31:29 +0200 Subject: [PATCH] Add support for LEGENDARY_CONFIG_PATH env --- src/LegendaryLauncher.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LegendaryLauncher.cs b/src/LegendaryLauncher.cs index b352189..bd32c16 100644 --- a/src/LegendaryLauncher.cs +++ b/src/LegendaryLauncher.cs @@ -14,7 +14,6 @@ using System.Reflection; using System.Text.RegularExpressions; using System.Threading.Tasks; -using System.Windows; namespace LegendaryLibraryNS { @@ -42,6 +41,11 @@ public static string ConfigPath legendaryConfigPath = heroicLegendaryConfigPath; } } + var envLegendaryConfigPath = Environment.GetEnvironmentVariable("LEGENDARY_CONFIG_PATH"); + if (!envLegendaryConfigPath.IsNullOrWhiteSpace() && Directory.Exists(envLegendaryConfigPath)) + { + legendaryConfigPath = envLegendaryConfigPath; + } return legendaryConfigPath; } }