From 237fdd773d146e4abace13851f49c4d40ad8d17f Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 27 May 2015 20:36:02 +0200 Subject: [PATCH] Make sure to properly cast FrameCapturer device pointer * External users identify the D3D11 frame capturer by the ID3D11Device * but if we don't do that cast explicitly the returned pointer is not correct to what is returned to the user on device creation. --- renderdoc/driver/d3d11/d3d11_device.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp index 94a1550f7..ef5d38523 100644 --- a/renderdoc/driver/d3d11/d3d11_device.cpp +++ b/renderdoc/driver/d3d11/d3d11_device.cpp @@ -2335,7 +2335,7 @@ void WrappedID3D11Device::ReleaseSwapchainResources(IDXGISwapChain *swap) Keyboard::RemoveInputWindow(desc.OutputWindow); - RenderDoc::Inst().RemoveFrameCapturer(this, desc.OutputWindow); + RenderDoc::Inst().RemoveFrameCapturer((ID3D11Device *)this, desc.OutputWindow); } auto it = m_SwapChains.find(swap); @@ -2444,7 +2444,7 @@ void WrappedID3D11Device::SetSwapChainTexture(IDXGISwapChain *swap, DXGI_SWAP_CH Keyboard::AddInputWindow(sdesc.OutputWindow); - RenderDoc::Inst().AddFrameCapturer(this, sdesc.OutputWindow, this); + RenderDoc::Inst().AddFrameCapturer((ID3D11Device *)this, sdesc.OutputWindow, this); } } @@ -2990,7 +2990,7 @@ HRESULT WrappedID3D11Device::Present(IDXGISwapChain *swap, UINT SyncInterval, UI DXGI_SWAP_CHAIN_DESC swapdesc; swap->GetDesc(&swapdesc); - bool activeWindow = RenderDoc::Inst().IsActiveWindow(this, swapdesc.OutputWindow); + bool activeWindow = RenderDoc::Inst().IsActiveWindow((ID3D11Device *)this, swapdesc.OutputWindow); if(m_State == WRITING_IDLE) {