[PATCH 2/5] ddraw: Do not unset the index buffer on D3D device destruction.

Henri Verbeet hverbeet at codeweavers.com
Sun Apr 3 16:35:30 CDT 2011


---
 dlls/ddraw/device.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 54e549f..9f8a6dd 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -288,15 +288,13 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
         DWORD i;
 
         EnterCriticalSection(&ddraw_cs);
+
+        /* There is no need to unset any resources here, wined3d will take
+         * care of that on Uninit3D(). */
+
         /* Free the index buffer. */
-        IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN);
         wined3d_buffer_decref(This->indexbuffer);
 
-        /* There is no need to unset the vertex buffer here, IWineD3DDevice_Uninit3D will do that when
-         * destroying the primary stateblock. If a vertex buffer is destroyed while it is bound
-         * IDirect3DVertexBuffer::Release will unset it.
-         */
-
         /* Set the device up to render to the front buffer since the back
          * buffer will vanish soon. */
         IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0,
-- 
1.7.3.4




More information about the wine-patches mailing list