zero d3d device cache

This commit is contained in:
aap 2021-01-09 21:05:14 +01:00
parent 78d540fce0
commit 61b288a9fe
1 changed files with 1 additions and 0 deletions

View File

@ -1599,6 +1599,7 @@ initD3D(void)
{ {
int32 s, t; int32 s, t;
memset(&deviceCache, 0, sizeof(deviceCache));
d3ddevice->GetRenderTarget(0, &d3d9Globals.defaultRenderTarget); d3ddevice->GetRenderTarget(0, &d3d9Globals.defaultRenderTarget);
d3d9Globals.defaultRenderTarget->Release(); // refcount increased by Get d3d9Globals.defaultRenderTarget->Release(); // refcount increased by Get
deviceCache.renderTargets[0] = d3d9Globals.defaultRenderTarget; deviceCache.renderTargets[0] = d3d9Globals.defaultRenderTarget;