From 5af1425c9760e38b2ac2b9c62ac3390436b135a2 Mon Sep 17 00:00:00 2001 From: goat Date: Fri, 26 May 2023 22:59:32 +0200 Subject: [PATCH] hook Present and ResizeBuffers with MinHook potentially works around a rare crash regarding discord hooks in functions called by Framework::Update() --- Dalamud/Interface/Internal/InterfaceManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 9a8da773c..f02baa890 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -1005,8 +1005,8 @@ internal class InterfaceManager : IDisposable, IServiceType Log.Error(ex, "Could not enable immersive mode"); } - this.presentHook = Hook.FromAddress(this.address.Present, this.PresentDetour); - this.resizeBuffersHook = Hook.FromAddress(this.address.ResizeBuffers, this.ResizeBuffersDetour); + this.presentHook = Hook.FromAddress(this.address.Present, this.PresentDetour, true); + this.resizeBuffersHook = Hook.FromAddress(this.address.ResizeBuffers, this.ResizeBuffersDetour, true); Log.Verbose("===== S W A P C H A I N ====="); Log.Verbose($"Present address 0x{this.presentHook!.Address.ToInt64():X}");