mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Fixed memory leak
This commit is contained in:
parent
42a22dd4bb
commit
cd8c5fc2ea
7 changed files with 20 additions and 11 deletions
|
|
@ -22,6 +22,7 @@ HRESULT GetDeviceAndCtxFromSwapchain(IDXGISwapChain* pSwapChain, ID3D11Device**
|
|||
|
||||
bool DX11_Hook::start_hook()
|
||||
{
|
||||
bool res = true;
|
||||
if (!_hooked)
|
||||
{
|
||||
if (!Windows_Hook::Inst().start_hook())
|
||||
|
|
@ -73,13 +74,13 @@ bool DX11_Hook::start_hook()
|
|||
else
|
||||
{
|
||||
PRINT_DEBUG("Failed to hook DirectX 11\n");
|
||||
return false;
|
||||
res = false;
|
||||
}
|
||||
|
||||
if(pDevice) pDevice->Release();
|
||||
if(pSwapChain) pSwapChain->Release();
|
||||
}
|
||||
return true;
|
||||
return res;
|
||||
}
|
||||
|
||||
void DX11_Hook::resetRenderState()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue