mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
reloaded by default, corehook => minhook
This commit is contained in:
parent
0dbf51330c
commit
6c06645b00
4 changed files with 9 additions and 7 deletions
|
|
@ -29,7 +29,7 @@ namespace Dalamud.Hooking
|
|||
/// <param name="address">A memory address to install a hook.</param>
|
||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
public Hook(IntPtr address, T detour)
|
||||
: this(address, detour, true)
|
||||
: this(address, detour, false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ namespace Dalamud.Hooking
|
|||
public Hook(IntPtr address, T detour, bool useMinHook)
|
||||
{
|
||||
address = HookManager.FollowJmp(address);
|
||||
this.isMinHook = true;
|
||||
this.isMinHook = EnvironmentConfiguration.DalamudForceMinHook || useMinHook;
|
||||
|
||||
var hasOtherHooks = HookManager.Originals.ContainsKey(address);
|
||||
if (!hasOtherHooks)
|
||||
|
|
@ -140,7 +140,7 @@ namespace Dalamud.Hooking
|
|||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
/// <returns>The hook with the supplied parameters.</returns>
|
||||
public static Hook<T> FromSymbol(string moduleName, string exportName, T detour)
|
||||
=> FromSymbol(moduleName, exportName, detour, true);
|
||||
=> FromSymbol(moduleName, exportName, detour, false);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a hook. Hooking address is inferred by calling to GetProcAddress() function.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue