Am 10.09.2015 um 13:48 schrieb Riccardo Bortolato rikyz619@gmail.com:
- memset(&ddsd, 0, sizeof(ddsd));
- ddsd.dwSize = sizeof(ddsd);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
- ddsd.dwWidth = 64;
- ddsd.dwHeight = 64;
- ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
- hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL);
- ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
- hr = IDirect3DDevice7_GetCaps(device, &device_desc);
- ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
- cubemap_supported = !!(device_desc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_CUBEMAP);
- IDirectDrawSurface7_Release(surface);
This surface isn't used anywhere.
I'd prefer if you add a comment that says that surfaces other than textures cause a segfault if they're passed to PreLoad. I think the best place is to put this somewhere near the test table.