[d3d8] question about "bogus" code

Christoph Frick frick at sc-networks.de
Wed Feb 15 04:18:01 CST 2006


hiho

as with newer versions more and more games i try no longer work (which
worked with wine around 0.9.0) i try to find the reasons. i stumbled
over this code in dlls/d3d8/surface.c:

date: 2006-02-14 17:05:35 +0000;  author: julliard;  state: Exp;  lines: +202 -319
Roderick Colenbrander <thunderbird2k at gmx.net>
d3d8: Move d3d8 surface over to wined3d (based on the work of Oliver Stieber).

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         (julliard 14-Feb-06):       if (This == D3D8_SURFACE_GET_DEVICE(This)->backBuffer) {
151 1.48         (julliard 14-Feb-06):      TRACE("(%p, backBuffer) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, D3D8_SURFACE(This)->resource.allocatedMemory);
152 1.48         (julliard 14-Feb-06):       } else if (This == D3D8_SURFACE_GET_DEVICE(This)->frontBuffer) {
153 1.48         (julliard 14-Feb-06):      TRACE("(%p, frontBuffer) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, D3D8_SURFACE(This)->resource.allocatedMemory);
154 1.48         (julliard 14-Feb-06):       } else if (This == D3D8_SURFACE_GET_DEVICE(This)->renderTarget) {
155 1.48         (julliard 14-Feb-06):      TRACE("(%p, renderTarget) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, D3D8_SURFACE(This)->resource.allocatedMemory);
156 1.48         (julliard 14-Feb-06):       } else if (This == D3D8_SURFACE_GET_DEVICE(This)->depthStencilBuffer) {
157 1.48         (julliard 14-Feb-06):      TRACE("(%p, stencilBuffer) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, D3D8_SURFACE(This)->resource.allocatedMemory);
158 1.9          (julliard 17-May-03):       }
159 1.9          (julliard 17-May-03):     } else {
160 1.48         (julliard 14-Feb-06):       TRACE("(%p) : rect@%p flags(%08lx), output lockedRect@%p, memory@%p\n", This, pRect, Flags, pLockedRect, D3D8_SURFACE(This)->resource.allocatedMemory);
161 1.9          (julliard 17-May-03):     }

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.

-- 
cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060215/2cf75acf/attachment.pgp


More information about the wine-devel mailing list