-----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