mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Added error handling when hook fails
This commit is contained in:
parent
71d3e301c2
commit
d06fbba104
12 changed files with 122 additions and 43 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue