Commit bd9d4108 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ddraw/tests: Actually test some return values (PVS-Studio).

parent 148d6e3c
...@@ -972,6 +972,7 @@ static void test_depth_blit(void) ...@@ -972,6 +972,7 @@ static void test_depth_blit(void)
memset(&ddsd_existing, 0, sizeof(ddsd_existing)); memset(&ddsd_existing, 0, sizeof(ddsd_existing));
ddsd_existing.dwSize = sizeof(ddsd_existing); ddsd_existing.dwSize = sizeof(ddsd_existing);
hr = IDirectDrawSurface_GetSurfaceDesc(ds1, &ddsd_existing); hr = IDirectDrawSurface_GetSurfaceDesc(ds1, &ddsd_existing);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
ddsd_new.dwWidth = ddsd_existing.dwWidth; ddsd_new.dwWidth = ddsd_existing.dwWidth;
...@@ -3733,6 +3734,7 @@ static void test_lighting_interface_versions(void) ...@@ -3733,6 +3734,7 @@ static void test_lighting_interface_versions(void)
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP,
tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT); tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice2_EndScene(device); hr = IDirect3DDevice2_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
......
...@@ -1180,6 +1180,7 @@ static void test_depth_blit(void) ...@@ -1180,6 +1180,7 @@ static void test_depth_blit(void)
memset(&ddsd_existing, 0, sizeof(ddsd_existing)); memset(&ddsd_existing, 0, sizeof(ddsd_existing));
ddsd_existing.dwSize = sizeof(ddsd_existing); ddsd_existing.dwSize = sizeof(ddsd_existing);
hr = IDirectDrawSurface4_GetSurfaceDesc(ds1, &ddsd_existing); hr = IDirectDrawSurface4_GetSurfaceDesc(ds1, &ddsd_existing);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
ddsd_new.dwWidth = ddsd_existing.dwWidth; ddsd_new.dwWidth = ddsd_existing.dwWidth;
...@@ -4090,6 +4091,7 @@ static void test_lighting_interface_versions(void) ...@@ -4090,6 +4091,7 @@ static void test_lighting_interface_versions(void)
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP,
tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT); tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice3_EndScene(device); hr = IDirect3DDevice3_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
......
...@@ -1090,6 +1090,7 @@ static void test_depth_blit(void) ...@@ -1090,6 +1090,7 @@ static void test_depth_blit(void)
memset(&ddsd_existing, 0, sizeof(ddsd_existing)); memset(&ddsd_existing, 0, sizeof(ddsd_existing));
ddsd_existing.dwSize = sizeof(ddsd_existing); ddsd_existing.dwSize = sizeof(ddsd_existing);
hr = IDirectDrawSurface7_GetSurfaceDesc(ds1, &ddsd_existing); hr = IDirectDrawSurface7_GetSurfaceDesc(ds1, &ddsd_existing);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd_new.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
ddsd_new.dwWidth = ddsd_existing.dwWidth; ddsd_new.dwWidth = ddsd_existing.dwWidth;
...@@ -3854,6 +3855,7 @@ static void test_lighting_interface_versions(void) ...@@ -3854,6 +3855,7 @@ static void test_lighting_interface_versions(void)
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP,
tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT); tests[i].vertextype, tests[i].data, 4, tests[i].draw_flags | D3DDP_WAIT);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice7_EndScene(device); hr = IDirect3DDevice7_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment