mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-22 16:39:19 +01:00
Hooking via VTable
This commit is contained in:
parent
f3bdea3c43
commit
17c18300b2
2 changed files with 95 additions and 7 deletions
|
|
@ -27,7 +27,7 @@ namespace Dalamud.Interface
|
|||
|
||||
private readonly Hook<PresentDelegate> presentHook;
|
||||
|
||||
private SwapChainAddressResolver Address { get; }
|
||||
private DXHookD3D11 dXHookD3D11 = new DXHookD3D11();
|
||||
|
||||
private RawDX11Scene scene;
|
||||
|
||||
|
|
@ -38,16 +38,15 @@ namespace Dalamud.Interface
|
|||
|
||||
public InterfaceManager(SigScanner scanner)
|
||||
{
|
||||
Address = new SwapChainAddressResolver();
|
||||
Address.Setup(scanner);
|
||||
|
||||
IntPtr addr = dXHookD3D11.Hook();
|
||||
Log.Verbose("===== S W A P C H A I N =====");
|
||||
Log.Verbose("Present address {Present}", Address.Present);
|
||||
Log.Verbose("Present address {Present}", addr);
|
||||
|
||||
this.presentHook =
|
||||
new Hook<PresentDelegate>(Address.Present,
|
||||
new PresentDelegate(PresentDetour),
|
||||
this);
|
||||
new Hook<PresentDelegate>(addr,
|
||||
new PresentDelegate(PresentDetour),
|
||||
this);
|
||||
}
|
||||
|
||||
public void Enable()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue