[d3d8] question about "bogus" code

Roderick Colenbrander thunderbird2k at gmx.net
Wed Feb 15 06:10:33 CST 2006

> 149 1.48         (julliard 14-Feb-06):     if (This ==
> D3D8_SURFACE_GET_DEVICE(This)->backBuffer || This ==
> D3D8_SURFACE_GET_DEVICE(This)->renderTarget || This ==
> D3D8_SURFACE_GET_DEVICE(This)->frontBuffer ||
> D3D8_SURFACE_GET_DEVICE(This)->depthStencilBuffer) { 150 1.48        
> why is in line 149 for the depthStencilBuffer check not comparing against
> This like in three checks before? if there is a reason, if would be good to
> have a comment there - otherwise it looks like an error.

The patch for the biggest part makes 'old' code working using a new wined3d 
based d3d8 surface. In order to make the old code reasable I added those 
D3D8_SURFACE / D3D8_SURFACE_GET_DEVICE macros to get access to data hidden in 
the wined3d surface which is wrapped inside a d3d8 surface. The LockRect code 
to which you are refering is just the old surface code moved over to the new 
surface structure using the macros I mentioned. I didn't change much in the 
old code except for macro changes and sometimes a little more. I have checked 
the old d3d8 code and the line looks the same. I think the missing is a bug 
but I don't know for sure. Note that code will be moved to wined3d soon.


More information about the wine-devel mailing list