Added class for Detour. It also detours the LoadLibrary function and thus has no problems if the game unloads the DX library and load it back again later.

Added some debug comments if logging mode is enabled.
This commit is contained in:
code@koerner-de.net
2013-07-30 17:19:44 +00:00
parent 601c8c1504
commit c23eda8db1
17 changed files with 793 additions and 160 deletions
+3 -1
View File
@@ -491,11 +491,13 @@ BOOL uMod_IDirect3DDevice9::ShowCursor(BOOL bShow)
HRESULT uMod_IDirect3DDevice9::CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DSwapChain9** pSwapChain)
{
Message("uMod_IDirect3DDevice9::CreateAdditionalSwapChain() %p\n", this);
return(m_pIDirect3DDevice9->CreateAdditionalSwapChain(pPresentationParameters,pSwapChain));
}
HRESULT uMod_IDirect3DDevice9::GetSwapChain(UINT iSwapChain,IDirect3DSwapChain9** pSwapChain)
{
Message("uMod_IDirect3DDevice9::GetSwapChain() %p\n", this);
return(m_pIDirect3DDevice9->GetSwapChain(iSwapChain,pSwapChain));
}
@@ -971,7 +973,7 @@ HRESULT uMod_IDirect3DDevice9::CreateOffscreenPlainSurface(UINT Width,UINT Heigh
HRESULT uMod_IDirect3DDevice9::SetRenderTarget(DWORD RenderTargetIndex,IDirect3DSurface9* pRenderTarget)
{
//Message( PRE_MESSAGE "::SetRenderTarget( %u, %p): %p\n", RenderTargetIndex, pRenderTarget, this);
Message( PRE_MESSAGE "::SetRenderTarget( %u, %p): %p\n", RenderTargetIndex, pRenderTarget, this);
{
IDirect3DSurface9 *back_buffer;
NormalRendering = false;