Commit 9905a5a8 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winex11.drv: Add XRandR 1.4 display settings handler.

parent 45d991d5
......@@ -318,7 +318,6 @@ static void _expect_dm(INT line, DEVMODEA expected, const CHAR *device, DWORD te
ok(get_primary_adapter(primary_adapter), "Failed to get primary adapter name.\n");
is_primary = !lstrcmpA(primary_adapter, device);
todo_wine_if(expected.dmFields & DM_POSITION)
ok_(__FILE__, line)((dm.dmFields & expected.dmFields) == expected.dmFields,
"Device %s test %d expect dmFields to contain %#x, got %#x\n", device, test, expected.dmFields, dm.dmFields);
/* Wine doesn't support changing color depth yet */
......
......@@ -3115,7 +3115,7 @@ static BOOL CALLBACK test_enum_display_settings(HMONITOR hmonitor, HDC hdc, LPRE
ret = EnumDisplaySettingsA(mi.szDevice, ENUM_CURRENT_SETTINGS, &dm);
ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError());
todo_wine ok((dm.dmFields & (DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT)) == (DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT),
ok((dm.dmFields & (DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT)) == (DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT),
"Unexpected dmFields %#x.\n", dm.dmFields);
/* Wine currently reports primary adapter positions for all adapters, same for other todo_wines in this function */
ret = get_primary_adapter_name(primary_adapter);
......@@ -3187,7 +3187,7 @@ static void test_EnumDisplaySettings(void)
ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError());
ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmICMMethod), "Expect dmSize %u, got %u\n",
FIELD_OFFSET(DEVMODEA, dmICMMethod), dm.dmSize);
todo_wine ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
setting_fields, dm.dmFields);
memset(&dm, 0, sizeof(dm));
......@@ -3196,7 +3196,7 @@ static void test_EnumDisplaySettings(void)
ok(ret, "EnumDisplaySettingsA failed, error %#x\n", GetLastError());
ok(dm.dmSize == FIELD_OFFSET(DEVMODEA, dmICMMethod), "Expect dmSize %u, got %u\n",
FIELD_OFFSET(DEVMODEA, dmICMMethod), dm.dmSize);
todo_wine ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
setting_fields, dm.dmFields);
memset(&dmW, 0, sizeof(dmW));
......@@ -3204,7 +3204,7 @@ static void test_EnumDisplaySettings(void)
ok(ret, "EnumDisplaySettingsW failed, error %#x\n", GetLastError());
ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod), "Expect dmSize %u, got %u\n",
FIELD_OFFSET(DEVMODEW, dmICMMethod), dmW.dmSize);
todo_wine ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
setting_fields, dmW.dmFields);
memset(&dmW, 0, sizeof(dmW));
......@@ -3213,7 +3213,7 @@ static void test_EnumDisplaySettings(void)
ok(ret, "EnumDisplaySettingsW failed, error %#x\n", GetLastError());
ok(dmW.dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod), "Expect dmSize %u, got %u\n",
FIELD_OFFSET(DEVMODEW, dmICMMethod), dmW.dmSize);
todo_wine ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
ok((dmW.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
setting_fields, dmW.dmFields);
/* EnumDisplaySettingsExA/W need dmSize to be at least FIELD_OFFSET(DEVMODEA/W, dmFields) + 1 to have valid dmFields */
......@@ -3271,7 +3271,7 @@ static void test_EnumDisplaySettings(void)
dm.dmSize = sizeof(dm);
ret = EnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &dm, 0);
ok(ret, "EnumDisplaySettingsExA failed, error %#x\n", GetLastError());
todo_wine ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
ok((dm.dmFields & setting_fields) == setting_fields, "Expect dmFields to contain %#x, got %#x\n",
setting_fields, dm.dmFields);
ok(dm.dmBitsPerPel == val, "Expect dmBitsPerPel %d, got %d\n", val, dm.dmBitsPerPel);
......@@ -3314,12 +3314,11 @@ static void test_EnumDisplaySettings(void)
{
if (mode == ENUM_CURRENT_SETTINGS)
{
todo_wine ok((dm.dmFields & setting_fields) == setting_fields,
ok((dm.dmFields & setting_fields) == setting_fields,
"Expect dmFields to contain %#x, got %#x\n", setting_fields, dm.dmFields);
}
else
{
todo_wine_if(mode != ENUM_REGISTRY_SETTINGS)
ok((dm.dmFields & mode_fields) == mode_fields, "Expect dmFields to contain %#x, got %#x\n",
mode_fields, dm.dmFields);
}
......@@ -3330,10 +3329,10 @@ static void test_EnumDisplaySettings(void)
if (mode == ENUM_CURRENT_SETTINGS && !attached)
{
todo_wine ok(dm.dmBitsPerPel == 0, "Expect dmBitsPerPel zero, got %u\n", dm.dmBitsPerPel);
todo_wine ok(dm.dmPelsWidth == 0, "Expect dmPelsWidth zero, got %u\n", dm.dmPelsWidth);
todo_wine ok(dm.dmPelsHeight == 0, "Expect dmPelsHeight zero, got %u\n", dm.dmPelsHeight);
todo_wine ok(dm.dmDisplayFrequency == 0, "Expect dmDisplayFrequency zero, got %u\n", dm.dmDisplayFrequency);
ok(dm.dmBitsPerPel == 0, "Expect dmBitsPerPel zero, got %u\n", dm.dmBitsPerPel);
ok(dm.dmPelsWidth == 0, "Expect dmPelsWidth zero, got %u\n", dm.dmPelsWidth);
ok(dm.dmPelsHeight == 0, "Expect dmPelsHeight zero, got %u\n", dm.dmPelsHeight);
ok(dm.dmDisplayFrequency == 0, "Expect dmDisplayFrequency zero, got %u\n", dm.dmDisplayFrequency);
}
else if (mode != ENUM_REGISTRY_SETTINGS)
{
......
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