[2/2] ddraw: add dsurface dimension tests, try 9
Stefan Dösinger
stefandoesinger at gmail.com
Sun Jun 29 01:45:03 CDT 2014
-----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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTr7XvAAoJEN0/YqbEcdMwYwMP/RXeG9kiO+8EJVRDOaPiSi3O
YOWppnsurP6oDCWo9RdtdbarfLGYeypGMPwTi/RAkdgYFbBJvqZhMGyINQ3DqCkn
nLVKZCfSBkKFFRG3IR4HixVqqlk/vXqtdFizV7IuzQYuGLdUCFPDKYqldDCQtdGH
vKGH97qJjIe28ArcHXPufdpV0ZxJBgKPn4XxD8ZquElPEPB0obF7jONYMohmWvWr
7bea+n7ecKNlfWUM/ROb0S/OBP2l8aQ/ZoGKdxQTJKDS6LJzAbkClt5limDnsToV
uabvHXvfv8t4jw2Sa3MkJEAcqWQ4fgkcqxltGk/AKNdmgs0Wfhp7ZdLGpZqFPjp6
tlNWsoU69NHRocghc41UB2droIbcU17U7jP7hd1kZOwGg1ksjDoDF2P/n375MFV7
gdKEMELD0c/i9Hy6pFYpQUgnS5X6pNcnHJR3EcxOi/lLUMBMnPpsWiDIQzcG9f58
hcTznm8MR2J1tphYZ4bnE7VmOXZOpDNqY7kyLe8PRMaOJlo70Z2yRAiqTL1dCqVP
ntZ7i7CeSxrejg8SWkzWwgBKKMHJ22fCK3UkfewbLqxmUcMVteypZ/ESh82C3LFE
OZVOW/iY2Ilt+dEdoH6guRV/2trzfj3UXOsLC9ZNmcl+VL4PLN+N8gytH9Q23/Ak
ApTtStXqJfLTv4OI7AHI
=VHdx
-----END PGP SIGNATURE-----
More information about the wine-devel
mailing list