[PATCH 2/2] kernel32: Match the Windows 10 1709+ SetConsoleFont() implementation.
Francois Gouget
fgouget at free.fr
Wed Nov 13 17:29:58 CST 2019
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 <fgouget at free.fr>
---
Same thing as the GetConsoleFontInfo() patch:
https://www.winehq.org/pipermail/wine-devel/2019-November/153940.html
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)
--
2.20.1
More information about the wine-devel
mailing list