D3D9: Add a reference to the container when creating a surface
H. Verbeet
hverbeet at gmail.com
Tue Dec 20 15:22:30 CST 2005
Creating a surface should add a reference to the surface container.
Verified on win2k, DirectX 9.0c.
Changelog:
- Add a reference to the container when creating a surface.
-------------- next part --------------
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 0d7baa9..d3c97de 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -276,6 +276,10 @@ HRESULT WINAPI IDirect3DDevice9Impl_Cre
FIXME("(%p) call to IWineD3DDevice_CreateSurface failed\n", This);
HeapFree(GetProcessHeap(), 0, object);
} else {
+ /* Add a reference to the container */
+ void *pContainer;
+ IDirect3DSurface9_GetContainer((IDirect3DSurface9 *)object, &IID_IUnknown, &pContainer);
+
TRACE("(%p) : Created surface %p\n", This, object);
*ppSurface = (LPDIRECT3DSURFACE9) object;
}
More information about the wine-patches
mailing list