mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Moved hooks calls and added hook retry
With that change, I no longer re-hook rendering functions as Hook_Manager::FoundRenderer removes all hooks and then we hook the true functions in the renderer specialization. Added a retry count.
This commit is contained in:
parent
5b0306dccc
commit
ca0ef4380a
8 changed files with 83 additions and 106 deletions
|
|
@ -16,7 +16,8 @@ bool DX9_Hook::start_hook()
|
|||
{
|
||||
if (!_hooked)
|
||||
{
|
||||
Hook_Manager::Inst().FoundRenderer(this);
|
||||
if (!Windows_Hook::Inst().start_hook())
|
||||
return false;
|
||||
|
||||
IDirect3D9Ex* pD3D;
|
||||
IDirect3DDevice9Ex* pDeviceEx;
|
||||
|
|
@ -33,8 +34,11 @@ bool DX9_Hook::start_hook()
|
|||
|
||||
if (pDeviceEx != nullptr)
|
||||
{
|
||||
_hooked = true;
|
||||
PRINT_DEBUG("Hooked DirectX 9\n");
|
||||
|
||||
_hooked = true;
|
||||
Hook_Manager::Inst().FoundRenderer(this);
|
||||
|
||||
loadFunctions(pDeviceEx);
|
||||
|
||||
UnhookAll();
|
||||
|
|
@ -47,8 +51,7 @@ bool DX9_Hook::start_hook()
|
|||
);
|
||||
EndHook();
|
||||
|
||||
if (Windows_Hook::Inst().start_hook())
|
||||
get_steam_client()->steam_overlay->HookReady();
|
||||
get_steam_client()->steam_overlay->HookReady();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue