mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-28 12:51:03 +00:00
Hack for crash in D3DGear if ppDevice pointer is NULL.
This commit is contained in:
@@ -195,9 +195,21 @@ private:
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
// Hack for D3DGear which crashes if ppDevice is NULL
|
||||
ID3D11Device *dummydev = NULL;
|
||||
bool dummyUsed = false;
|
||||
if(ppDevice == NULL)
|
||||
{
|
||||
ppDevice = &dummydev;
|
||||
dummyUsed = true;
|
||||
}
|
||||
|
||||
HRESULT ret = createFunc(pAdapter, DriverType, Software, Flags, pFeatureLevels, FeatureLevels,
|
||||
SDKVersion, pUsedSwapDesc, ppSwapChain, ppDevice, pFeatureLevel, ppImmediateContext);
|
||||
|
||||
SAFE_RELEASE(dummydev);
|
||||
if(dummyUsed) ppDevice = NULL;
|
||||
|
||||
RDCDEBUG("Called real createdevice...");
|
||||
|
||||
bool suppress = false;
|
||||
|
||||
Reference in New Issue
Block a user