mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
d3dx9/tests: Use SetRectEmpty() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
46b6f60de1
commit
bb79ca5b54
1 changed files with 2 additions and 2 deletions
|
@ -1249,7 +1249,7 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetRect(&rect, 0, 0, 0, 0);
|
SetRectEmpty(&rect);
|
||||||
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_BMP, surface, NULL, &rect);
|
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_BMP, surface, NULL, &rect);
|
||||||
/* fails with the debug version of d3d9 */
|
/* fails with the debug version of d3d9 */
|
||||||
ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
|
ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileInMemory returned %#x, expected %#x\n", hr, D3D_OK);
|
||||||
|
@ -1388,7 +1388,7 @@ next_tests:
|
||||||
SetRect(&rect, -1, -1, 2, 2);
|
SetRect(&rect, -1, -1, 2, 2);
|
||||||
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
|
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
|
||||||
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
|
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
|
||||||
SetRect(&rect, 0, 0, 0, 0);
|
SetRectEmpty(&rect);
|
||||||
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
|
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
|
||||||
/* fails when debug version of d3d9 is used */
|
/* fails when debug version of d3d9 is used */
|
||||||
ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
|
ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
|
||||||
|
|
Loading…
Reference in a new issue