Updated hooks.

This commit is contained in:
Nemirtingas 2019-07-31 22:20:27 +02:00
parent 6328b59b0b
commit 631bcf9edf
6 changed files with 40 additions and 41 deletions

View file

@ -68,6 +68,8 @@ void DX11_Hook::resetRenderState()
pContext->Release();
ImGui_ImplDX11_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
initialized = false;
}
@ -188,11 +190,7 @@ DX11_Hook::~DX11_Hook()
PRINT_DEBUG("DX11 Hook removed\n");
if (_hooked)
{
ImGui_ImplDX11_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
}
resetRenderState();
hook = nullptr;
}