From c293c1ae05d5521dcf89378117b558756e27c62e Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Thu, 1 Aug 2019 17:05:41 +0200 Subject: [PATCH] Fixed game shutdown hang. Should watch the other implementations if they need the same treat or not. --- overlay_experimental/DX9_Hook.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay_experimental/DX9_Hook.cpp b/overlay_experimental/DX9_Hook.cpp index 15e6dc3..bc7b315 100644 --- a/overlay_experimental/DX9_Hook.cpp +++ b/overlay_experimental/DX9_Hook.cpp @@ -182,7 +182,11 @@ DX9_Hook::~DX9_Hook() PRINT_DEBUG("DX9 Hook removed\n"); if (_hooked) - resetRenderState(); + { + ImGui_ImplDX9_InvalidateDeviceObjects(); + ImGui_ImplWin32_Shutdown(); + ImGui::DestroyContext(); + } hook = nullptr; }