mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
chore: always ignore default if env vars are predefined
This commit is contained in:
parent
0c59f65aef
commit
9d538d3b2a
1 changed files with 12 additions and 8 deletions
|
|
@ -55,14 +55,9 @@ namespace Dalamud.Injector
|
|||
}
|
||||
|
||||
// Set boot defaults
|
||||
var prevFixList = Environment.GetEnvironmentVariable("DALAMUD_GAMEFIX_LIST");
|
||||
if (string.IsNullOrWhiteSpace(prevFixList))
|
||||
{
|
||||
Environment.SetEnvironmentVariable("DALAMUD_GAMEFIX_LIST", "prevent_devicechange_crashes,disable_game_openprocess_access_check,redirect_openprocess");
|
||||
}
|
||||
|
||||
Environment.SetEnvironmentVariable("DALAMUD_DOTNET_OPENPROCESS_HOOKMODE", "0");
|
||||
Environment.SetEnvironmentVariable("DALAMUD_UNHOOK_DLLS", "kernel32.dll,ntdll.dll,user32.dll");
|
||||
SetEnvDefaultIfNotExist("DALAMUD_GAMEFIX_LIST", "prevent_devicechange_crashes,disable_game_openprocess_access_check,redirect_openprocess");
|
||||
SetEnvDefaultIfNotExist("DALAMUD_DOTNET_OPENPROCESS_HOOKMODE", "0");
|
||||
SetEnvDefaultIfNotExist("DALAMUD_UNHOOK_DLLS", "kernel32.dll,ntdll.dll,user32.dll");
|
||||
|
||||
DalamudStartInfo startInfo = null;
|
||||
if (args.Count == 1)
|
||||
|
|
@ -111,6 +106,15 @@ namespace Dalamud.Injector
|
|||
}
|
||||
}
|
||||
|
||||
private static void SetEnvDefaultIfNotExist(string name, string value)
|
||||
{
|
||||
var prevValue = Environment.GetEnvironmentVariable(name);
|
||||
if (string.IsNullOrWhiteSpace(prevValue))
|
||||
{
|
||||
Environment.SetEnvironmentVariable(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetLogPath(string filename)
|
||||
{
|
||||
var baseDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue