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) ...@@ -743,17 +743,18 @@ static void test_ChangeDisplaySettingsEx(void)
{ {
dm.dmPosition = position; dm.dmPosition = position;
dm.dmFields |= DM_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 */ /* Reattach detached non-primary adapters, otherwise ChangeDisplaySettingsExA with only CDS_RESET fails */
if (mode == 0 && device) 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); 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", ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n",
devices[device].name, mode, res); devices[device].name, mode, res);
res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL); res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL);
} }
else
{
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_RESET, NULL);
}
ok(res == DISP_CHANGE_SUCCESSFUL || ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* TestBots using VGA driver can't change to some modes */ 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