PATCH: Add allocation/desallocation of the light private data
Christian Costa
titan.costa at wanadoo.fr
Wed Sep 25 17:00:09 CDT 2002
Changelog :
dlls/ddraw/d3dlight.c
Add allocation/desallocation of the light private data
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: d3dlight.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/d3dlight.c,v
retrieving revision 1.7
diff -u -r1.7 d3dlight.c
--- d3dlight.c 31 May 2002 23:25:45 -0000 1.7
+++ d3dlight.c 25 Sep 2002 21:48:26 -0000
@@ -111,6 +111,7 @@
IDirect3DLightImpl* light;
light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl));
+ light->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dl_private));
light->ref = 1;
ICOM_VTBL(light) = &light_vtable;
light->d3d.d3d2 = d3d2;
@@ -129,6 +130,7 @@
IDirect3DLightImpl* light;
light = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(IDirect3DLightImpl));
+ light->private = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(mesa_d3dl_private));
light->ref = 1;
ICOM_VTBL(light) = &light_vtable;
@@ -173,9 +175,10 @@
static ULONG WINAPI IDirect3DLightImpl_Release(LPDIRECT3DLIGHT iface)
{
ICOM_THIS(IDirect3DLightImpl,iface);
- FIXME("(%p)->() decrementing from %lu.\n", This, This->ref );
+ TRACE("(%p)->() decrementing from %lu.\n", This, This->ref );
if (!--(This->ref)) {
+ HeapFree(GetProcessHeap(),0,This->private);
HeapFree(GetProcessHeap(),0,This);
return 0;
}
More information about the wine-patches
mailing list