mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 04:50:35 +00:00
Add super hacky fix for even more hacky horrible internal MS code
This commit is contained in:
@@ -1182,7 +1182,16 @@ public:
|
||||
/* [annotation][out] */
|
||||
__out IDXGIAdapter1 **ppAdapter)
|
||||
{
|
||||
HRESULT ret = m_pReal1->EnumAdapters1(Adapter, ppAdapter);
|
||||
IDXGIFactory1 *factory = m_pReal1;
|
||||
if(m_pReal1 == NULL)
|
||||
{
|
||||
// see comment in RefCountDXGIObject::HandleWrap for IDXGIFactory
|
||||
RDCWARN("Calling EnumAdapters1 with no IDXGIFactory1 - assuming weird internal call");
|
||||
factory = (IDXGIFactory1 *)m_pReal;
|
||||
}
|
||||
|
||||
HRESULT ret = factory->EnumAdapters1(Adapter, ppAdapter);
|
||||
|
||||
if(SUCCEEDED(ret))
|
||||
*ppAdapter = (IDXGIAdapter1 *)(new WrappedIDXGIAdapter3(*ppAdapter));
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user