mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Force Reloaded hook option
This commit is contained in:
parent
9c27212d37
commit
8a58782e86
2 changed files with 7 additions and 2 deletions
|
|
@ -22,10 +22,15 @@ namespace Dalamud.Configuration.Internal
|
|||
/// </summary>
|
||||
public static bool DalamudNoPlugins { get; } = GetEnvironmentVariable("DALAMUD_NOT_HAVE_PLUGINS");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the DalamudForceReloaded setting has been enabled.
|
||||
/// </summary>
|
||||
public static bool DalamudForceReloaded { get; } = GetEnvironmentVariable("DALAMUD_FORCE_RELOADED");
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the DalamudForceCoreHook setting has been enabled.
|
||||
/// </summary>
|
||||
public static bool DalamudForceMinHook { get; } = GetEnvironmentVariable("DALAMUD_FORCE_COREHOOK");
|
||||
public static bool DalamudForceMinHook { get; } = GetEnvironmentVariable("DALAMUD_FORCE_MINHOOK");
|
||||
|
||||
private static bool GetEnvironmentVariable(string name)
|
||||
=> bool.Parse(Environment.GetEnvironmentVariable(name) ?? "false");
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Dalamud.Hooking
|
|||
private Hook(IntPtr address, T detour, bool useMinHook, Assembly callingAssembly)
|
||||
{
|
||||
address = HookManager.FollowJmp(address);
|
||||
this.isMinHook = EnvironmentConfiguration.DalamudForceMinHook || useMinHook;
|
||||
this.isMinHook = !EnvironmentConfiguration.DalamudForceReloaded && (EnvironmentConfiguration.DalamudForceMinHook || useMinHook);
|
||||
|
||||
var hasOtherHooks = HookManager.Originals.ContainsKey(address);
|
||||
if (!hasOtherHooks)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue