Implement QueryInterface for IDXGISwapChain4

Without this fix, QueryInterface would return an unwrapped swap chain, which later causes errors when using its unwrapped swap chain buffers.
This commit is contained in:
Nicolas Guillemot
2016-12-08 18:36:14 -08:00
committed by Baldur Karlsson
parent b5e2a93cfe
commit 0a7aa47791
+13
View File
@@ -272,6 +272,19 @@ HRESULT STDMETHODCALLTYPE WrappedIDXGISwapChain4::QueryInterface(REFIID riid, vo
return E_NOINTERFACE;
}
}
else if(riid == __uuidof(IDXGISwapChain4))
{
if(m_pReal4)
{
AddRef();
*ppvObject = (IDXGISwapChain4 *)this;
return S_OK;
}
else
{
return E_NOINTERFACE;
}
}
else
{
string guid = ToStr::Get(riid);