ddraw/tests: Check some more return values (LLVM/Clang).
This commit is contained in:
parent
f4005c371f
commit
c45609f15c
|
@ -961,6 +961,7 @@ static BOOL D3D1_createObjects(void)
|
||||||
ddsd.dwWidth = 256;
|
ddsd.dwWidth = 256;
|
||||||
ddsd.dwHeight = 256;
|
ddsd.dwHeight = 256;
|
||||||
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &Surface1, NULL);
|
hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &Surface1, NULL);
|
||||||
|
ok(SUCCEEDED(hr), "IDirectDraw_CreateSurface returned %#x.\n", hr);
|
||||||
if (!Surface1) {
|
if (!Surface1) {
|
||||||
skip("DDSCAPS_3DDEVICE surface not available\n");
|
skip("DDSCAPS_3DDEVICE surface not available\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1388,6 +1389,7 @@ static void Direct3D1Test(void)
|
||||||
vp_data.dvScaleX = 1;
|
vp_data.dvScaleX = 1;
|
||||||
vp_data.dvScaleY = 1;
|
vp_data.dvScaleY = 1;
|
||||||
hr = IDirect3DViewport_SetViewport(Viewport, &vp_data);
|
hr = IDirect3DViewport_SetViewport(Viewport, &vp_data);
|
||||||
|
ok(SUCCEEDED(hr), "IDirect3DViewport_SetViewport returned %#x.\n", hr);
|
||||||
i = 12345;
|
i = 12345;
|
||||||
hr = IDirect3DViewport_TransformVertices(Viewport, sizeof(offscreentest) / sizeof(offscreentest[0]),
|
hr = IDirect3DViewport_TransformVertices(Viewport, sizeof(offscreentest) / sizeof(offscreentest[0]),
|
||||||
&transformdata, D3DTRANSFORM_CLIPPED,
|
&transformdata, D3DTRANSFORM_CLIPPED,
|
||||||
|
@ -1397,6 +1399,7 @@ static void Direct3D1Test(void)
|
||||||
vp_data.dwWidth = 256;
|
vp_data.dwWidth = 256;
|
||||||
vp_data.dwHeight = 256;
|
vp_data.dwHeight = 256;
|
||||||
hr = IDirect3DViewport_SetViewport(Viewport, &vp_data);
|
hr = IDirect3DViewport_SetViewport(Viewport, &vp_data);
|
||||||
|
ok(SUCCEEDED(hr), "IDirect3DViewport_SetViewport returned %#x.\n", hr);
|
||||||
i = 12345;
|
i = 12345;
|
||||||
hr = IDirect3DViewport_TransformVertices(Viewport, sizeof(offscreentest) / sizeof(offscreentest[0]),
|
hr = IDirect3DViewport_TransformVertices(Viewport, sizeof(offscreentest) / sizeof(offscreentest[0]),
|
||||||
&transformdata, D3DTRANSFORM_CLIPPED,
|
&transformdata, D3DTRANSFORM_CLIPPED,
|
||||||
|
@ -2598,10 +2601,12 @@ static void DeviceLoadTest(void)
|
||||||
memset(&ddsd, 0, sizeof(DDSURFACEDESC2));
|
memset(&ddsd, 0, sizeof(DDSURFACEDESC2));
|
||||||
ddsd.dwSize = sizeof(ddsd);
|
ddsd.dwSize = sizeof(ddsd);
|
||||||
hr = IDirectDrawSurface7_GetSurfaceDesc(texture_levels[0][i1], &ddsd);
|
hr = IDirectDrawSurface7_GetSurfaceDesc(texture_levels[0][i1], &ddsd);
|
||||||
|
ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc returned %#x.\n", hr);
|
||||||
|
|
||||||
memset(&ddsd2, 0, sizeof(DDSURFACEDESC2));
|
memset(&ddsd2, 0, sizeof(DDSURFACEDESC2));
|
||||||
ddsd2.dwSize = sizeof(ddsd2);
|
ddsd2.dwSize = sizeof(ddsd2);
|
||||||
hr = IDirectDrawSurface7_GetSurfaceDesc(texture_levels[1][i], &ddsd2);
|
hr = IDirectDrawSurface7_GetSurfaceDesc(texture_levels[1][i], &ddsd2);
|
||||||
|
ok(SUCCEEDED(hr), "IDirectDrawSurface7_GetSurfaceDesc returned %#x.\n", hr);
|
||||||
|
|
||||||
if (ddsd.dwWidth == ddsd2.dwWidth && ddsd.dwHeight == ddsd2.dwHeight)
|
if (ddsd.dwWidth == ddsd2.dwWidth && ddsd.dwHeight == ddsd2.dwHeight)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2433,6 +2433,7 @@ static void PrivateDataTest(void)
|
||||||
ref2 = getref((IUnknown *) lpDD);
|
ref2 = getref((IUnknown *) lpDD);
|
||||||
ok(ref2 == ref + 1, "Object reference is %d, expected %d\n", ref2, ref + 1);
|
ok(ref2 == ref + 1, "Object reference is %d, expected %d\n", ref2, ref + 1);
|
||||||
hr = IDirectDrawSurface7_FreePrivateData(surface7, &IID_IDirectDrawSurface7);
|
hr = IDirectDrawSurface7_FreePrivateData(surface7, &IID_IDirectDrawSurface7);
|
||||||
|
ok(SUCCEEDED(hr), "IDirectDrawSurface7_FreePrivateData returned %#x.\n", hr);
|
||||||
ref2 = getref((IUnknown *) lpDD);
|
ref2 = getref((IUnknown *) lpDD);
|
||||||
ok(ref2 == ref, "Object reference is %d, expected %d\n", ref2, ref);
|
ok(ref2 == ref, "Object reference is %d, expected %d\n", ref2, ref);
|
||||||
|
|
||||||
|
|
|
@ -615,10 +615,12 @@ static void offscreen_test(IDirect3DDevice7 *device)
|
||||||
|
|
||||||
out:
|
out:
|
||||||
hr = IDirect3DDevice7_SetTexture(device, 0, NULL);
|
hr = IDirect3DDevice7_SetTexture(device, 0, NULL);
|
||||||
|
ok(SUCCEEDED(hr), "IDirect3DDevice7_SetTexture returned %#x.\n", hr);
|
||||||
|
|
||||||
/* restore things */
|
/* restore things */
|
||||||
if(backbuffer) {
|
if(backbuffer) {
|
||||||
hr = IDirect3DDevice7_SetRenderTarget(device, backbuffer, 0);
|
hr = IDirect3DDevice7_SetRenderTarget(device, backbuffer, 0);
|
||||||
|
ok(SUCCEEDED(hr), "IDirect3DDevice7_SetRenderTarget returned %#x.\n", hr);
|
||||||
IDirectDrawSurface7_Release(backbuffer);
|
IDirectDrawSurface7_Release(backbuffer);
|
||||||
}
|
}
|
||||||
if(offscreen) {
|
if(offscreen) {
|
||||||
|
|
Loading…
Reference in New Issue