Re: [3/3] ddraw: Keep track of interface attached by AddAttachedSurface and detach correct interface when parent is released. (try 2)

2011-10-11 Thread Alexandre Julliard
Octavian Voicu writes: > Fixes a bug that causes a stencil buffer leak in the game The Longest Journey. > Problem can be seen in the console output log attached to bug #11819. > This patch doesn't fix the original bug, but now game exits cleanly. > > The root of the problem is that when releasing

Re: [ 3/3] ddraw: Keep track of interface attached by AddAttachedSurface and detach correct interface when parent is released.

2011-10-10 Thread Octavian Voicu
On Mon, Oct 10, 2011 at 10:04 AM, Henri Verbeet wrote: > Can't you just handle this in ddraw_surface_delete_attached_surface()? > I.e., replace the Release calls in > ddraw_surface?_DeleteAttachedSurface() with a > IUnknown_Release(Surf->attached_iface) in > ddraw_surface_delete_attached_surface()

Re: [ 3/3] ddraw: Keep track of interface attached by AddAttachedSurface and detach correct interface when parent is released.

2011-10-10 Thread Henri Verbeet
On 10 October 2011 08:07, Octavian Voicu wrote: > +static HRESULT delete_attached_surface_helper(IDirectDrawSurfaceImpl *root, > IDirectDrawSurfaceImpl *detach) > +{ > +    if (detach->attached_iface == &detach->IDirectDrawSurface4_iface) > +        return > IDirectDrawSurface4_DeleteAttachedSur