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) ...@@ -2532,6 +2532,7 @@ static void test_EnumDisplaySettings(void)
DEVMODE devmode; DEVMODE devmode;
DWORD val; DWORD val;
HDC hdc; HDC hdc;
DWORD num;
memset(&devmode, 0, sizeof(devmode)); memset(&devmode, 0, sizeof(devmode));
devmode.dmSize = sizeof(devmode); devmode.dmSize = sizeof(devmode);
...@@ -2550,6 +2551,16 @@ static void test_EnumDisplaySettings(void) ...@@ -2550,6 +2551,16 @@ static void test_EnumDisplaySettings(void)
} }
ReleaseDC(0, hdc); 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) START_TEST(sysparams)
......
...@@ -316,6 +316,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW ...@@ -316,6 +316,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW
return TRUE; return TRUE;
} }
TRACE("mode %d -- not present (%s)\n", n, handler_name); TRACE("mode %d -- not present (%s)\n", n, handler_name);
SetLastError(ERROR_NO_MORE_FILES);
return FALSE; 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