Commit 068cf6f0 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32/tests: Fix a test failure on w7u_2qxl TestBot VM.

parent 1d1665ef
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment