On 22 January 2012 16:32, Stefan Dösinger <[email protected]> wrote: > +static void get_depth_stencil(IDirect3DDevice7 *device, IDirectDrawSurface7 > **ds) > +{ > + IDirectDrawSurface7 *rt; > + DDSCAPS2 caps = {DDSCAPS_ZBUFFER, 0, 0, 0}; > + HRESULT hr; > + > + hr = IDirect3DDevice7_GetRenderTarget(device, &rt); > + ok(SUCCEEDED(hr), "Failed to get the render target, hr %#x.\n", hr); > + hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, ds); > + ok(SUCCEEDED(hr) || hr == DDERR_NOTFOUND, "Failed to get the z buffer, > hr %#x.\n", hr); > + IDirectDrawSurface7_Release(rt); > +} This should probably just return the surface.
> + hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **) &ddraw); Extra space. > + ok(SUCCEEDED(hr), "Failed to set the z cuntion, hr %#x.\n", hr); Typo. > + memset(&fx, 0, sizeof(fx)); > + fx.dwSize = sizeof(fx); > + fx.dwFillDepth = 0; That probably needs an U5(). I tend to forget half of them as well though.
