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

@ -26,6 +26,8 @@ void DX12_Hook::resetRenderState()
pDescriptorHeap->Release();
ImGui_ImplDX12_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
initialized = false;
}
@ -35,7 +37,7 @@ void DX12_Hook::prepareForOverlay(IDXGISwapChain* pSwapChain)
{
DXGI_SWAP_CHAIN_DESC desc;
pSwapChain->GetDesc(&desc);
if (!initialized)
{
D3D12_DESCRIPTOR_HEAP_DESC d3d12_desc = {};
@ -149,11 +151,7 @@ DX12_Hook::~DX12_Hook()
PRINT_DEBUG("DX11 Hook removed\n");
if (_hooked)
{
ImGui_ImplDX12_Shutdown();
ImGui_ImplWin32_Shutdown();
ImGui::DestroyContext();
}
resetRenderState();
hook = nullptr;
}