[GDI32_APITEST] Fix test on all versions of Windows at certain vertical resolutions (#8048)

* Use MulDiv to generate the result and negate that instead of dividing by a negative number, which can cause test failures.
This commit is contained in:
Carl J. Bialorucki 2025-06-03 14:08:03 -06:00 committed by GitHub
parent aa0089a3ec
commit 0947a64a90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,7 +178,7 @@ void Test_SetWindowExtEx()
/* Check the viewport now, should not be the same */
GetViewportExtEx(hDC, &ViewportExt);
ok_long(ViewportExt.cx, GetDeviceCaps(GetDC(0), VERTRES));
ok_long(ViewportExt.cy, -GetDeviceCaps(GetDC(0), VERTRES) / 3);
ok_long(ViewportExt.cy, -MulDiv(GetDeviceCaps(GetDC(0), VERTRES), 1, 3));
/* again isotropic mode with 1:3 res */
SetViewportExtEx(hDC, 6000, 3000, 0);