[PATCH 1/2] ddraw/tests: Fix copy&paste errors in open coded SetRect()
Michael Stefaniuc
mstefani at redhat.de
Tue Mar 22 04:33:36 CDT 2016
Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
dst_rect.top set twice, .bottom not at all.
dlls/ddraw/tests/visual.c | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c
index 3ac8d4f..7332bae 100644
--- a/dlls/ddraw/tests/visual.c
+++ b/dlls/ddraw/tests/visual.c
@@ -652,35 +652,27 @@ static void blt_test(IDirect3DDevice7 *device)
hr = IDirectDrawSurface_Blt(offscreen, &dst_rect, backbuffer, &src_rect, 0, NULL);
ok(hr == DD_OK, "fullscreen Blt from backbuffer => texture failed with hr = %08x\n", hr);
- /* backbuffer ==> texture, flip in y-direction through source rectangle, no scaling (allowed) */
- dst_rect.left = 0; dst_rect.right = 640;
- dst_rect.top = 480; dst_rect.top = 0;
- src_rect.left = 0; src_rect.right = 640;
- src_rect.top = 0; src_rect.bottom = 480;
+ /* backbuffer ==> texture, flip in y-direction through source rectangle, no scaling (not allowed) */
+ SetRect(&dst_rect, 0, 480, 640, 0);
+ SetRect(&src_rect, 0, 0, 640, 480);
hr = IDirectDrawSurface_Blt(offscreen, &dst_rect, backbuffer, &src_rect, 0, NULL);
- ok(hr == DD_OK, "backbuffer => texture flip-y src_rect failed with hr = %08x\n", hr);
+ ok(hr == DDERR_INVALIDRECT, "backbuffer => texture flip-y src_rect failed with hr = %08x\n", hr);
/* backbuffer ==> texture, flip in x-direction through source rectangle, no scaling (not allowed) */
- dst_rect.left = 640; dst_rect.right = 0;
- dst_rect.top = 0; dst_rect.top = 480;
- src_rect.left = 0; src_rect.right = 640;
- src_rect.top = 0; src_rect.bottom = 480;
+ SetRect(&dst_rect, 640, 0, 0, 480);
+ SetRect(&src_rect, 0, 0, 640, 480);
hr = IDirectDrawSurface_Blt(offscreen, &dst_rect, backbuffer, &src_rect, 0, NULL);
ok(hr == DDERR_INVALIDRECT, "backbuffer => texture flip-x src_rect failed with hr = %08x\n", hr);
/* backbuffer ==> texture, flip in y-direction through destination rectangle (not allowed) */
- dst_rect.left = 0; dst_rect.right = 640;
- dst_rect.top = 0; dst_rect.top = 480;
- src_rect.left = 0; src_rect.right = 640;
- src_rect.top = 480; src_rect.bottom = 0;
+ SetRect(&dst_rect, 0, 0, 640, 480);
+ SetRect(&src_rect, 0, 480, 640, 0);
hr = IDirectDrawSurface_Blt(offscreen, &dst_rect, backbuffer, &src_rect, 0, NULL);
ok(hr == DDERR_INVALIDRECT, "backbuffer => texture flip-y dst_rect failed with hr = %08x\n", hr);
/* backbuffer ==> texture, flip in x-direction through destination rectangle, no scaling (not allowed) */
- dst_rect.left = 0; dst_rect.right = 640;
- dst_rect.top = 0; dst_rect.top = 480;
- src_rect.left = 640; src_rect.right = 0;
- src_rect.top = 0; src_rect.bottom = 480;
+ SetRect(&dst_rect, 0, 0, 640, 480);
+ SetRect(&src_rect, 640, 0, 0, 480);
hr = IDirectDrawSurface_Blt(offscreen, &dst_rect, backbuffer, &src_rect, 0, NULL);
ok(hr == DDERR_INVALIDRECT, "backbuffer => texture flip-x dst_rect failed with hr = %08x\n", hr);
}
--
2.4.3
More information about the wine-patches
mailing list