Jacek Caban : kernel32: Use IOCTL_CONDRV_GET_OUTPUT_INFO in get_console_font_size.
Alexandre Julliard
julliard at winehq.org
Thu Jul 9 17:10:40 CDT 2020
Module: wine
Branch: master
Commit: 0c3c89b74decfdab8e0227d87e5eecdb3380806c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0c3c89b74decfdab8e0227d87e5eecdb3380806c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jul 9 19:28:20 2020 +0200
kernel32: Use IOCTL_CONDRV_GET_OUTPUT_INFO in get_console_font_size.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 e919fcf3f1..0a45a0e294 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;
}
More information about the wine-cvs
mailing list