Skip to content

Commit 0947a64

Browse files
authored
[GDI32_APITEST] Fix test on all versions of Windows at certain vertical resolutions (reactos#8048)
* Use MulDiv to generate the result and negate that instead of dividing by a negative number, which can cause test failures.
1 parent aa0089a commit 0947a64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/rostests/apitests/gdi32/SetWindowExtEx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void Test_SetWindowExtEx()
178178
/* Check the viewport now, should not be the same */
179179
GetViewportExtEx(hDC, &ViewportExt);
180180
ok_long(ViewportExt.cx, GetDeviceCaps(GetDC(0), VERTRES));
181-
ok_long(ViewportExt.cy, -GetDeviceCaps(GetDC(0), VERTRES) / 3);
181+
ok_long(ViewportExt.cy, -MulDiv(GetDeviceCaps(GetDC(0), VERTRES), 1, 3));
182182

183183
/* again isotropic mode with 1:3 res */
184184
SetViewportExtEx(hDC, 6000, 3000, 0);

0 commit comments

Comments
 (0)