-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-06-28 17:43, schrieb Patrick Rudolph:
- for (j = 0; j < sizeof(formats) / sizeof(*formats); j ++)
- {
for (i = 0; i < sizeof(tests) / sizeof(*tests); i ++)
{
I don't think we use "i ++" with a space anywhere. Please make it i++ or ++i.
- hr = IDirectDraw_SetCooperativeLevel(ddraw, NULL, DDSCL_NORMAL);
- ok(SUCCEEDED(hr), "SetCooperativeLevel failed with %08x\n", hr);
- IDirectDraw_Release(ddraw);
- DestroyWindow(window);
+}
The SetCooperativeLevel call is redundant here. I think it was used in the old test because dsurface.c re-used the IDirectDraw object.
hr = IDirectDraw2_CreateSurface(ddraw, &surfacedesc,
&surface, NULL);
ok(hr == tests[i].hr, "Pixelformat %s, test %d returned
%08x\n", formats[j].name, i, hr);
if (surface)
{
IDirectDrawSurface2_Release(surface);
surface = NULL;
}
IDirectDraw2_CreateSurface returns an IDirectDrawSurface, not IDirectDrawSurface2.
Other than that this patch looks good to me.