DDraw: Split up the ddraw refcount

Stefan Dösinger stefandoesinger at gmx.at
Thu Jul 6 12:17:57 CDT 2006


Am Mittwoch 05 Juli 2006 18:27 schrieb Stefan Dösinger:
> Am Mittwoch 05 Juli 2006 02:27 schrieb Stefan Dösinger:
> > The DirectDraw reference counting is a bit more complex than it seemed at
> > first. The unit test in that patch shows that the IDirectDraw,
> > IDirectDraw2, IDirectDraw4 and IDirectDraw7 interfaces of one object have
> > their own reference count. The object is the same, the test with
> > SetCooperativeLevel shows this(Setting a focus window returns an error in
> > exclusive mode). Interestingly the IDirect3DX interfaces do not have
> > their own refcount, instead they are linked to a DirectDraw interface
> > refcount.
> >
> > This patch splits up the IDirectDrawImpl::ref member in ref7, ref4, ref2
> > and ref1 and changes the AddRef and Release methods accordingly. Of
> > course a number of tests to show this behavior are included :-)
> >
> > I will also send a patch which fixes some reference counting issues with
> > Palettes, and both patches depend on each other. So please apply either
> > both patches or none of them if one is wrong.
> >
> > ChangeLog:
> > Stefan Dösinger: Split the ddraw refcount
>
> Here is an updated patch, it implements the destroy condition as suggested
> by Rob and adds the accidentally dropped SetCooperativeLevel(NULL,
> DDSCL_NORMAL) cooplevel and screen mode restoring call.
Oh wait, this is not necessarilly correct. Considered that Direct3D came with 
DirectX 3.0 (I think) IDirect3D(1) isn't necessarily linked to 
IDirectDraw(1).

I will add some more tests to check for that, do not apply this patch for now
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060706/5e14e809/attachment.pgp


More information about the wine-devel mailing list