Empire Earth continued

Stefan Dösinger stefandoesinger at gmx.at
Sun Sep 11 13:21:39 CDT 2005

> What you could test is artifically increase the refcount of 'normal'
> surfaces and check if these are deleted or not.
Sorry for the delay, I was busy over the weekend, but here are some more 
results. I hope I wasn't misslead by anything again ;-)

*Windows increases the refcount of the DirectDraw7 object by 1 when a surface 
is created. When the surface is released, the refcount of the DirectDraw7 
object is decreased, obviously. Wine doesn't do so(yet), and to my current 
knowledge, this is what makes Empire Earth crash.

*Windows does free all Surfaces, once their DirectDraw7 parent is freed. So 
Wine is correct in doing the same. The refcount of the surfaces doesn't 
matter in this case.

*It's irrelevant if a D3D object is involved or not. Creating a D3D object 
just increases the refcount of the DirectDraw7 object and the surface, so 
more releases are neccessary, that's all.

I am looking for a good place to place the AddRef and Release calls to solve 
the first issue, and I'll send a patch as soon as I have one. I hope that my 
Cooperative Level patch is applied at this time, this will make creating 
another patch easier.


More information about the wine-devel mailing list