Commit 9e44c4bc authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw/tests: Fix a couple of return value checks.

parent 93afc43e
...@@ -1249,7 +1249,7 @@ static void test_ck_rgba(void) ...@@ -1249,7 +1249,7 @@ static void test_ck_rgba(void)
ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture, (void **)&texture);
ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr);
IDirect3DTexture_GetHandle(texture, device, &texture_handle); hr = IDirect3DTexture_GetHandle(texture, device, &texture_handle);
ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr);
IDirect3DTexture_Release(texture); IDirect3DTexture_Release(texture);
......
...@@ -1511,7 +1511,7 @@ static void test_ck_rgba(void) ...@@ -1511,7 +1511,7 @@ static void test_ck_rgba(void)
ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to create destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture); hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture);
ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to get texture interface, hr %#x.\n", hr);
IDirect3DTexture2_GetHandle(texture, device, &texture_handle); hr = IDirect3DTexture2_GetHandle(texture, device, &texture_handle);
ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to get texture handle, hr %#x.\n", hr);
IDirect3DTexture2_Release(texture); IDirect3DTexture2_Release(texture);
......
...@@ -624,7 +624,7 @@ static void testsurface(void) ...@@ -624,7 +624,7 @@ static void testsurface(void)
SetBkColor(hdc, RGB(0, 0, 255)); SetBkColor(hdc, RGB(0, 0, 255));
SetTextColor(hdc, RGB(255, 255, 0)); SetTextColor(hdc, RGB(255, 255, 0));
TextOut(hdc, 0, 0, testMsg, lstrlen(testMsg)); TextOut(hdc, 0, 0, testMsg, lstrlen(testMsg));
IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc); rc = IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc);
ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n",rc); ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n",rc);
while (1) while (1)
......
...@@ -2947,7 +2947,7 @@ static void PaletteTest(void) ...@@ -2947,7 +2947,7 @@ static void PaletteTest(void)
if (FAILED(hr)) goto err; if (FAILED(hr)) goto err;
/* Read back the palette and verify the entries. Without DDPCAPS_ALLOW256 set /* Read back the palette and verify the entries. Without DDPCAPS_ALLOW256 set
/ entry 0 and 255 should have been overwritten with black and white */ / entry 0 and 255 should have been overwritten with black and white */
IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]); hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
ok(hr == DD_OK, "GetEntries failed with %08x\n", hr); ok(hr == DD_OK, "GetEntries failed with %08x\n", hr);
if(hr == DD_OK) if(hr == DD_OK)
{ {
...@@ -2967,9 +2967,9 @@ static void PaletteTest(void) ...@@ -2967,9 +2967,9 @@ static void PaletteTest(void)
/* CreatePalette without DDPCAPS_ALLOW256 ignores entry 0 and 255, /* CreatePalette without DDPCAPS_ALLOW256 ignores entry 0 and 255,
/ now check we are able to update the entries afterwards. */ / now check we are able to update the entries afterwards. */
IDirectDrawPalette_SetEntries(palette , 0, 0, 256, &Table[0]); hr = IDirectDrawPalette_SetEntries(palette , 0, 0, 256, &Table[0]);
ok(hr == DD_OK, "SetEntries failed with %08x\n", hr); ok(hr == DD_OK, "SetEntries failed with %08x\n", hr);
IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]); hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
ok(hr == DD_OK, "GetEntries failed with %08x\n", hr); ok(hr == DD_OK, "GetEntries failed with %08x\n", hr);
if(hr == DD_OK) if(hr == DD_OK)
{ {
...@@ -2987,7 +2987,7 @@ static void PaletteTest(void) ...@@ -2987,7 +2987,7 @@ static void PaletteTest(void)
ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr); ok(hr == DD_OK, "CreatePalette failed with %08x\n", hr);
if (FAILED(hr)) goto err; if (FAILED(hr)) goto err;
IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]); hr = IDirectDrawPalette_GetEntries(palette , 0, 0, 256, &palEntries[0]);
ok(hr == DD_OK, "GetEntries failed with %08x\n", hr); ok(hr == DD_OK, "GetEntries failed with %08x\n", hr);
if(hr == DD_OK) if(hr == DD_OK)
{ {
...@@ -3752,7 +3752,7 @@ static void GetDCFormatTest(void) ...@@ -3752,7 +3752,7 @@ static void GetDCFormatTest(void)
if(SUCCEEDED(hr)) if(SUCCEEDED(hr))
{ {
IDirectDrawSurface7_ReleaseDC(surface, dc); hr = IDirectDrawSurface7_ReleaseDC(surface, dc);
ok(hr == DD_OK, "IDirectDrawSurface7_ReleaseDC failed, hr = 0x%08x\n", hr); ok(hr == DD_OK, "IDirectDrawSurface7_ReleaseDC failed, hr = 0x%08x\n", hr);
dc = 0; dc = 0;
} }
......
...@@ -234,7 +234,7 @@ static void set_viewport_size(IDirect3DDevice7 *device) ...@@ -234,7 +234,7 @@ static void set_viewport_size(IDirect3DDevice7 *device)
memset(&ddsd, 0, sizeof(ddsd)); memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd); ddsd.dwSize = sizeof(ddsd);
IDirectDrawSurface7_GetSurfaceDesc(target, &ddsd); hr = IDirectDrawSurface7_GetSurfaceDesc(target, &ddsd);
ok(hr == D3D_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08x\n", hr); ok(hr == D3D_OK, "IDirectDrawSurface7_GetSurfaceDesc returned %08x\n", hr);
IDirectDrawSurface7_Release(target); IDirectDrawSurface7_Release(target);
...@@ -360,7 +360,7 @@ static void lighting_test(IDirect3DDevice7 *device) ...@@ -360,7 +360,7 @@ static void lighting_test(IDirect3DDevice7 *device)
Indices, 6 /* Indexcount */, 0 /* flags */); Indices, 6 /* Indexcount */, 0 /* flags */);
ok(hr == D3D_OK, "IDirect3DDevice7_DrawIndexedPrimitiveUP failed with %08x\n", hr); ok(hr == D3D_OK, "IDirect3DDevice7_DrawIndexedPrimitiveUP failed with %08x\n", hr);
IDirect3DDevice7_EndScene(device); hr = IDirect3DDevice7_EndScene(device);
ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\n", hr); ok(hr == D3D_OK, "IDirect3DDevice7_EndScene failed with %08x\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