fix: support XL_PLATFORM as well (hopefully)

This commit is contained in:
Kaz Wolfe 2025-03-24 09:12:13 -07:00
parent fdbfdbb2cd
commit 30cadef34b
No known key found for this signature in database
GPG key ID: 258813F53A16EBB4
2 changed files with 24 additions and 0 deletions

View file

@ -11,6 +11,8 @@ using System.Text.RegularExpressions;
using Dalamud.Common;
using Dalamud.Common.Game;
using Dalamud.Common.Util;
using Newtonsoft.Json;
using Reloaded.Memory.Buffers;
using Serilog;
@ -311,6 +313,10 @@ namespace Dalamud.Injector
var unhandledExceptionStr = startInfo.UnhandledException.ToString().ToLowerInvariant();
var troubleshootingData = "{\"empty\": true, \"description\": \"No troubleshooting data supplied.\"}";
// env vars are brought in prior to launch args, since args can override them.
if (EnvironmentUtils.TryGetEnvironmentVariable("XL_PLATFORM", out var xlPlatformEnv))
platformStr = xlPlatformEnv.ToLowerInvariant();
for (var i = 2; i < args.Count; i++)
{
if (args[i].StartsWith(key = "--dalamud-working-directory="))