[PATCH 1/2] ddraw: COM cleanup for IDirectDrawSurface3 iface

Stefan Dösinger stefandoesinger at gmx.at
Wed May 25 13:37:27 CDT 2011


On Wednesday 25 May 2011 00:39:46 Ričardas Barkauskas wrote:
> My first try for COM cleanup. Please donėt be too harsh :)
> If this is too large for one patch, please suggest how to split it.
> 
> This is not automatic clean up so I don't really expect it to be good on
> first try.
I can't find anything wrong with it on first sight, but I don't really know how 
to manually review a patch that large with many repetitions. I guess I could 
print them on a *lot* of paper and read them at the pool or something like 
that.

I don't see an easy way to split them up either :-/ . I guess we'll have to 
trust Puk's script verification.

Just one thing: in unsafe_impl_from_IDirectDrawSurface*:

> +    if (iface->lpVtbl != &ddraw_surface7_vtbl) return NULL;
I don't think apps can pass in their own ddraw object implementations. I've 
never seen an app that does that or any document that suggests this is 
possible and achives something. So I'd recommend to add a FIXME() or ERR() to 
that case. An ERR because the most likely cause for such a behavior is that 
our own ddrawex.dll screws up. This is the only other place where we have a 
IDirectDrawSurface* implementation.

Or we could just remove the check and see if we ever crash because trying to 
read surface implementation fields returns odd values.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110525/141e5d0c/attachment.pgp>


More information about the wine-devel mailing list