Added error handling when hook fails

This commit is contained in:
Nemirtingas 2019-08-16 19:10:12 +02:00
parent 71d3e301c2
commit d06fbba104
12 changed files with 122 additions and 43 deletions

View file

@ -12,7 +12,7 @@
// This is created by DX10_Hook::Create, and deleted by the Hook_Manager if not used
static DX10_Hook* hook;
void DX10_Hook::start_hook()
bool DX10_Hook::start_hook()
{
if (!_hooked)
{
@ -55,10 +55,12 @@ void DX10_Hook::start_hook()
else
{
PRINT_DEBUG("Failed to hook DirectX 10\n");
return false;
}
if(pDevice)pDevice->Release();
if(pSwapChain)pSwapChain->Release();
}
return true;
}
void DX10_Hook::resetRenderState()