Commit 75de6243 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

winex11: Set last error on enumerating display settings.

parent 43837ed2
......@@ -2532,6 +2532,7 @@ static void test_EnumDisplaySettings(void)
DEVMODE devmode;
DWORD val;
HDC hdc;
DWORD num;
memset(&devmode, 0, sizeof(devmode));
devmode.dmSize = sizeof(devmode);
......@@ -2550,6 +2551,16 @@ static void test_EnumDisplaySettings(void)
}
ReleaseDC(0, hdc);
num = 1;
while (1) {
SetLastError (0xdeadbeef);
if (!EnumDisplaySettings(NULL, num++, &devmode)) {
DWORD le = GetLastError();
ok (le == ERROR_NO_MORE_FILES, "Last error on EnumDisplaySettings was %d, expected ERROR_NO_MORE_FILES\n", le);
break;
}
}
}
START_TEST(sysparams)
......
......@@ -316,6 +316,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW
return TRUE;
}
TRACE("mode %d -- not present (%s)\n", n, handler_name);
SetLastError(ERROR_NO_MORE_FILES);
return FALSE;
}
......
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