-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Sorry, there are always more issues to find :-( .
Am 2015-07-16 um 18:08 schrieb Aaryaman Vasishta:
- hr = IDirectDrawSurface_GetClipper(d3drm_primary, &d3drm_clipper);
...
- if (d3drm_primary)
IDirectDrawSurface_Release(d3drm_primary);
The if check here is redundant. I expect Coverity to complain about this sooner or later... (version 2 and 3 are affected too)
- hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm3, clipper, &driver, 0, 0, &device3);
- todo_wine ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %x.\n", hr);
...
- /* If NULL is passed for clipper, CreateDeviceFromClipper returns D3DRMERR_BADVALUE */
- hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm3, NULL, &driver, 0, 0, &device3);
- todo_wine ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %x.\n", hr);
Does it return D3DRMERR_BADVALUE because clipper is NULL or because width / height are 0? Don't test two error conditions at once, unless both return a different error and you want to test the priority of the error handling. (version 2 and 3 are affected too)
- /* What happens if we don't pass D3DRMDEVICE_NOZBUFFER and still not attach our own depth surface? */
- hr = IDirect3DRM3_CreateDeviceFromSurface(d3drm3, &driver, ddraw, surface, D3DRMDEVICE_NOZBUFFER, &device3);
- ok(SUCCEEDED(hr), "Cannot create IDirect3DRMDevice3 interface (hr = %x).\n", hr);
Please also test what happens when you have an already attached depth surface and do *not* pass D3DRMDEVICE_NOZBUFFER. I suspect that it either works like version 2 (your surface is kept, no error), or that it returns an error (because AddAttachedSurface fails).