From 0c3c89b74decfdab8e0227d87e5eecdb3380806c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 9 Jul 2020 19:28:20 +0200 Subject: [PATCH] kernel32: Use IOCTL_CONDRV_GET_OUTPUT_INFO in get_console_font_size. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/kernel32/console.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index e919fcf3f11..0a45a0e2940 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -1391,6 +1391,7 @@ BOOL WINAPI GetCurrentConsoleFont(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_ static COORD get_console_font_size(HANDLE hConsole, DWORD index) { + struct condrv_output_info info; COORD c = {0,0}; if (index >= GetNumberOfConsoleFonts()) @@ -1399,16 +1400,12 @@ static COORD get_console_font_size(HANDLE hConsole, DWORD index) return c; } - SERVER_START_REQ(get_console_output_info) + if (DeviceIoControl( hConsole, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, &info, sizeof(info), NULL, NULL )) { - req->handle = console_handle_unmap(hConsole); - if (!wine_server_call_err(req)) - { - c.X = reply->font_width; - c.Y = reply->font_height; - } + c.X = info.font_width; + c.Y = info.font_height; } - SERVER_END_REQ; + else SetLastError( ERROR_INVALID_HANDLE ); return c; }