<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +    hr = IDirect3D2_QueryInterface(d3d2, &IID_IDirectDraw, (void**)&ddraw);<br>
</span>Why aren't you using the existing ddraw1 interface variable?<br></blockquote><div>Ah, My bad. I must've missed the already existing variables, I probably wrote this in a hurry to get the tests working.  <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> +    primary_surface_found = FALSE;<br>
> +    hr = IDirectDraw_EnumSurfaces(ddraw, DDENUMSURFACES_ALL | DDENUMSURFACES_DOESEXIST,<br>
> +        NULL, NULL, surface_callback);<br>
> +    ok(hr == DD_OK, "Failed to enumerate surfaces (hr = %x).\n", hr);<br>
> +    ok(!primary_surface_found, "Primary surface shouldn't be created by CreateDeviceFromD3D.\n");<br>
> +    IDirectDraw_Release(ddraw);<br>
> +<br>
</span><span class="">> +    hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &ds);<br>
> +    ok(hr == DD_OK, "Cannot get attached depth surface (hr = %x).\n", hr);<br>
> +<br>
> +    desc.dwSize = sizeof(desc);<br>
> +    hr = IDirectDrawSurface_GetSurfaceDesc(ds, &desc);<br>
> +    ok(hr == DD_OK, "Cannot get z surface desc structure (hr = %x).\n", hr);<br>
</span>I think here it would be interesting to confirm that the Z surface is<br>
the one created by create_device().<br></blockquote><div>So use a global variable to store the z surface we created from create_device? That should work I guess. <br><br><br><br></div><div>Thanks!<br></div><div>jam<br></div></div><br></div></div>