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

@ -18,7 +18,7 @@ static DX9_Hook* hook;
///////// /////////
//////////////////////////////////////////////////////////////////
void DX9_Hook::start_hook()
bool DX9_Hook::start_hook()
{
if (!_hooked)
{
@ -56,11 +56,13 @@ void DX9_Hook::start_hook()
else
{
PRINT_DEBUG("Failed to DirectX 9\n");
return false;
}
if(pDeviceEx)pDeviceEx->Release();
if(pD3D)pD3D->Release();
}
return true;
}
void DX9_Hook::resetRenderState()