From da238dc1d11cb57333de40d5ec76985c75f39130 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 14 Nov 2019 00:29:58 +0100 Subject: [PATCH] kernel32: Match the Windows 10 1709+ SetConsoleFont() implementation. That is return the same 'E_NOTIMPL' error code. Remove the todo_wine-s but keep the tests in case we want to implement the API for compatibility with old Windows versions. Signed-off-by: Francois Gouget Signed-off-by: Alexandre Julliard --- dlls/kernel32/console.c | 2 +- dlls/kernel32/tests/console.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 4c0bee2caf9..a698e53efed 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -1627,7 +1627,7 @@ DWORD WINAPI GetNumberOfConsoleFonts(void) BOOL WINAPI SetConsoleFont(HANDLE hConsole, DWORD index) { FIXME("(%p, %u): stub!\n", hConsole, index); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + SetLastError(LOWORD(E_NOTIMPL) /* win10 1709+ */); return FALSE; } diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 171b2dad4d6..1ecb350673d 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -2973,12 +2973,12 @@ static void test_SetConsoleFont(HANDLE std_output) skip("SetConsoleFont is not implemented\n"); return; } - todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); SetLastError(0xdeadbeef); ret = pSetConsoleFont(GetStdHandle(STD_INPUT_HANDLE), 0); ok(!ret, "got %d, expected zero\n", ret); - todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts"); if (!pGetNumberOfConsoleFonts)