This adds brackets to make the comparison work and therefore the variable `scaled` gets set.
Otherwise `scaled` and later `expect_width` and `expect_height` stays all zeros.
https://test.winehq.org/data/patterns-tb-wine.html#user32:monitor
This testbot run has this change applied: https://testbot.winehq.org/JobDetails.pl?Key=151521
From: Bernhard Übelacker bernhardu@mailbox.org
--- dlls/user32/tests/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 30a25e53fe3..97805d8b59e 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -3212,7 +3212,7 @@ static void test_monitor_dpi_awareness( const struct monitor_info *infos, UINT c { if (infos[i].rect.left == 0 && infos[i].rect.top == 0) primary = infos[i].rect;
- if (info - infos + i) UnionRect( &scaled_virtual, &scaled_virtual, &infos[i].rect ); + if (info - (infos + i)) UnionRect( &scaled_virtual, &scaled_virtual, &infos[i].rect ); else { scaled = monitor = infos[i].rect;
Rémi Bernon (@rbernon) commented about dlls/user32/tests/monitor.c:
{ if (infos[i].rect.left == 0 && infos[i].rect.top == 0) primary = infos[i].rect;
if (info - infos + i) UnionRect( &scaled_virtual, &scaled_virtual, &infos[i].rect );
if (info - (infos + i)) UnionRect( &scaled_virtual, &scaled_virtual, &infos[i].rect );
Not really sure to understand what the difference exactly is with / without the parentheses, but this could probably be `info != infos + i`.