DDraw: Split up the ddraw refcount

Stefan Dösinger stefandoesinger at gmx.at
Wed Jul 5 11:27:12 CDT 2006


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-DDraw-Split-the-ddraw-refcount.txt.bz2
Type: application/x-bzip2
Size: 5663 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060705/8dd49dff/0006-DDraw-Split-the-ddraw-refcount.txt.bin


More information about the wine-patches mailing list