ddraw: The ddraw surface is now always the wined3d surface's parent.

This GetParent() trick would now cause infinite recursion.
oldstable
Henri Verbeet 2009-09-25 13:31:51 +02:00 committed by Alexandre Julliard
parent cd96c6e355
commit 33bfcdd044
1 changed files with 0 additions and 37 deletions

View File

@ -365,43 +365,6 @@ IDirectDrawSurfaceImpl_Release(IDirectDrawSurface7 *iface)
*/
TRACE("(%p) D3D unloaded\n", This);
}
else if(This->surface_desc.ddsCaps.dwCaps & (DDSCAPS_PRIMARYSURFACE |
DDSCAPS_3DDEVICE |
DDSCAPS_TEXTURE ) )
{
/* It's a render target, but no swapchain was created.
* The IParent interfaces have to be released manually.
* The same applies for textures without an
* IWineD3DTexture object attached
*/
IParent *Parent;
for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
{
if(This->complex_array[i])
{
/* Only the topmost level can have more than 1 surfaces in the complex
* attachment array(Cube texture roots), for all others there is only
* one
*/
surf = This->complex_array[i];
while(surf)
{
IWineD3DSurface_GetParent(surf->WineD3DSurface,
(IUnknown **) &Parent);
IParent_Release(Parent); /* For the getParent */
IParent_Release(Parent); /* To release it */
surf = surf->complex_array[0];
}
}
}
/* Now the top-level surface */
IWineD3DSurface_GetParent(This->WineD3DSurface,
(IUnknown **) &Parent);
IParent_Release(Parent); /* For the getParent */
IParent_Release(Parent); /* To release it */
}
/* The refcount test shows that the palette is detached when the surface is destroyed */
IDirectDrawSurface7_SetPalette((IDirectDrawSurface7 *)This, NULL);