From 61b288a9fe72ae4073c0ac5fd2a5815ed510c8c8 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 9 Jan 2021 21:05:14 +0100 Subject: [PATCH] zero d3d device cache --- src/d3d/d3ddevice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/d3d/d3ddevice.cpp b/src/d3d/d3ddevice.cpp index e2462b9..2f39ac8 100644 --- a/src/d3d/d3ddevice.cpp +++ b/src/d3d/d3ddevice.cpp @@ -1599,6 +1599,7 @@ initD3D(void) { int32 s, t; + memset(&deviceCache, 0, sizeof(deviceCache)); d3ddevice->GetRenderTarget(0, &d3d9Globals.defaultRenderTarget); d3d9Globals.defaultRenderTarget->Release(); // refcount increased by Get deviceCache.renderTargets[0] = d3d9Globals.defaultRenderTarget;