mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
move detour into function
This commit is contained in:
parent
b0fac2bc47
commit
e641cac71c
1 changed files with 7 additions and 6 deletions
|
|
@ -333,12 +333,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
if (ImGui.Button("Create"))
|
||||
{
|
||||
this.messageBoxMinHook = Hook<MessageBoxWDelegate>.FromSymbol(
|
||||
"User32", "MessageBoxW",
|
||||
(wnd, text, caption, type) =>
|
||||
{
|
||||
Log.Information("[DATAHOOK] {0} {1} {2} {3}", wnd, text, caption, type);
|
||||
return this.messageBoxMinHook.Original(wnd, text, caption, type);
|
||||
});
|
||||
"User32", "MessageBoxW", MessageBoxWDetour);
|
||||
}
|
||||
|
||||
if (ImGui.Button("Enable")) this.messageBoxMinHook?.Enable();
|
||||
|
|
@ -380,6 +375,12 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.EndChild();
|
||||
}
|
||||
|
||||
private int MessageBoxWDetour(IntPtr hwnd, string text, string caption, NativeFunctions.MessageBoxType type)
|
||||
{
|
||||
Log.Information("[DATAHOOK] {0} {1} {2} {3}", hwnd, text, caption, type);
|
||||
return this.messageBoxMinHook.Original(hwnd, text, caption, type);
|
||||
}
|
||||
|
||||
private void DrawServerOpCode()
|
||||
{
|
||||
ImGui.TextUnformatted(this.serverOpString);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue