Henri Verbeet : ddraw: Do not unset the index buffer on D3D device destruction.

Alexandre Julliard julliard at winehq.org
Mon Apr 4 10:10:51 CDT 2011


Module: wine
Branch: master
Commit: 024b5c2245c374bedc7685bd8539b7010bc38227
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=024b5c2245c374bedc7685bd8539b7010bc38227

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Sun Apr  3 23:35:30 2011 +0200

ddraw: Do not unset the index buffer on D3D device destruction.

---

 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,




More information about the wine-cvs mailing list