kernel32: Use IOCTL_CONDRV_GET_OUTPUT_INFO in get_console_font_size.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-09 19:28:20 +02:00 committed by Alexandre Julliard
parent af3320c575
commit 0c3c89b74d
1 changed files with 5 additions and 8 deletions

View File

@ -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;
}