user32/tests: Fix a test failure on w7u_2qxl TestBot VM.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1d1665efb3
commit
068cf6f02c
|
@ -743,17 +743,18 @@ static void test_ChangeDisplaySettingsEx(void)
|
|||
{
|
||||
dm.dmPosition = position;
|
||||
dm.dmFields |= DM_POSITION;
|
||||
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_RESET, NULL);
|
||||
/* Reattach detached non-primary adapters, otherwise ChangeDisplaySettingsExA with only CDS_RESET fails */
|
||||
if (mode == 0 && device)
|
||||
{
|
||||
todo_wine ok(res == DISP_CHANGE_FAILED, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n",
|
||||
devices[device].name, mode, res);
|
||||
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
|
||||
ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n",
|
||||
devices[device].name, mode, res);
|
||||
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_RESET, NULL);
|
||||
}
|
||||
|
||||
ok(res == DISP_CHANGE_SUCCESSFUL ||
|
||||
broken(res == DISP_CHANGE_FAILED), /* TestBots using VGA driver can't change to some modes */
|
||||
|
|
Loading…
Reference in New Issue