[PATCH 2/2] ddraw/tests: add test for surface preload (v3)

Stefan Dösinger stefandoesinger at gmail.com
Fri Sep 11 07:34:35 CDT 2015


> Am 10.09.2015 um 13:48 schrieb Riccardo Bortolato <rikyz619 at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150911/7c497cea/attachment-0001.sig>


More information about the wine-devel mailing list