Wine 0.9.16 and ddraw issues

Stefan Dösinger stefandoesinger at
Sat Jul 1 06:09:42 CDT 2006

> I looked at that, and it is a reference counting issue. Red alert deals
> nicely with its surfaces and the ddraw object itself, but it creates a
> palette and doesn't release it. A palette holds a reference to the
> DirectDraw interface it was created from, this is shown by a test case I
> sent some days ago. Because the palette isn't released, the final release
> call of the DirectDraw interface returns 1 instead of the apparently
> expected 0. On windows 95 it apparently gets a final refcount of 0, I could
> imaging that reference counting is different in older ddraw interfaces, or
> that there is some call which implicitly releases all palettes(I can only
> imaging
> IDirectDraw::RestoreDisplayMode)
> This worked in the old directdraw version because it (incorrectly) didn't
> AddRef the device when a Palette was created.
I have an update on that: A quick test showed that while 
IDirectDraw7::CreatePalette addrefs the interface as shown in my refcount 
test, IDirectDraw::CreatePalette doesn't do so. So the 2 DirectDraw interface 
versions behave differently here.

This is related to the refcounting issue Star wars racer is having:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url :

More information about the wine-devel mailing list