-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Am 2015-09-09 um 19:02 schrieb Riccardo Bortolato:
> + hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
> + ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
> +
> + if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d)))
> + {
> + skip("D3D interface is not available, skipping test.\n");
> + goto done;
> + }
> +
> + hr = IDirect3D7_EnumDevices(d3d, enum_devtype_cb, &hal_ok);
> + ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
> + if (hal_ok)
> + devtype = &IID_IDirect3DTnLHalDevice;
> +
> + memset(&z_fmt, 0, sizeof(z_fmt));
> + hr = IDirect3D7_EnumZBufferFormats(d3d, devtype, enum_z_fmt, &z_fmt);
> + if (FAILED(hr) || !z_fmt.dwSize)
> + {
> + skip("No depth buffer formats available, skipping test.\n");
> + goto done;
> + }
> ...
There is a helper function called create_device for this.
> + IDirect3DDevice7_PreLoad(device, surface);
This incarnation of PreLoad returns a value. It's probably always
D3D_OK, but please test it for success / failure.
Cheers,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJV8JT4AAoJEN0/YqbEcdMw4zQP/23zlgm39IW26Wga1gKx4gmJ
2nCC01cpnjsr6TxOH/TYdWNxbXncmG45UlPbCe3H2TU57Aro/dcDAAG4epswuhNU
0rd7TMgkwhUJ+6PDgiYUGdhab30Oem0IvWdS+Z8RNZAdwarpcsbQgIvvpMDMiRgF
sNkpCdr2aFVJbjUU9c0sgswumQxOCgok1Z4s6cSOHDK8UmRMRDob1E9U/3QQ77d2
JdsZYeAsTjxWzznX4S77+SklIUaF+ga2noTqOzUf4IHZhJc/2KgMW/r2ZmRYAHxH
FyP6E02aVhnhD+PjH3lCBQXGvdQ+oE40Bvtt8ZMMvWP9JkS4ZtkLOC24UYD4jt03
4zPVt1WvqZ7LQFEKjKSfEZMG9wRkMYu/69YVxy5A+QgBiVPLyW2cNTk8FbKRG9mU
C5ctjIwhgWVzldSv2kLNeuSDgFr+ybo9BuvBySjzHSabvXaJ8jAsj30zG5UwPOmV
e/FjZUzhrK+oAFGPSeZvHauoE14gskPR2V0jNV7h3gXfwvy2thwYWOksS6QihpA1
Rx67RgS8uxre7VfxsqCQsFl8irE/wmKYsGIpqMGYiAFNETCigFuz8nmDBx0I4Oqo
ZGmOYATtU09Ap8WVEtcwSLdHbVRy9UF/aStRI1dAeWcFcXxXdEZvop7jWaNMaEmZ
V90SEh1KkRgOew5ZkDXp
=RHsN
-----END PGP SIGNATURE-----