mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
backend name in hook tracker
This commit is contained in:
parent
6c06645b00
commit
4df62e1607
4 changed files with 28 additions and 0 deletions
|
|
@ -112,6 +112,9 @@ namespace Dalamud.Hooking
|
|||
/// </summary>
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string BackendName => "Reloaded/Asm";
|
||||
|
||||
/// <summary>
|
||||
/// Remove a hook from the current process.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -131,6 +131,18 @@ namespace Dalamud.Hooking
|
|||
/// </summary>
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string BackendName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.isMinHook)
|
||||
return "MinHook";
|
||||
|
||||
return "Reloaded";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a hook. Hooking address is inferred by calling to GetProcAddress() function.
|
||||
/// The hook is not activated until Enable() method is called.
|
||||
|
|
|
|||
|
|
@ -21,5 +21,10 @@ namespace Dalamud.Hooking
|
|||
/// Gets a value indicating whether or not the hook is disposed.
|
||||
/// </summary>
|
||||
public bool IsDisposed { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the hooking backend used for the hook.
|
||||
/// </summary>
|
||||
public string BackendName { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Reflection;
|
|||
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.Internal;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Hooking.Internal;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin.Internal;
|
||||
|
|
@ -196,6 +197,9 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.Text("Status");
|
||||
ImGui.NextColumn();
|
||||
|
||||
ImGui.Text("Backend");
|
||||
ImGui.NextColumn();
|
||||
|
||||
ImGui.Separator();
|
||||
ImGui.Separator();
|
||||
|
||||
|
|
@ -240,6 +244,10 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
}
|
||||
|
||||
ImGui.NextColumn();
|
||||
|
||||
ImGui.Text(trackedHook.Hook.BackendName);
|
||||
|
||||
ImGui.NextColumn();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue