kernelbase: Use IOCTL_CONDRV_GET_OUTPUT_INFO in GetLargestConsoleWindowSize.

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:42 +02:00 committed by Alexandre Julliard
parent 2789787f01
commit d25a267978
1 changed files with 7 additions and 8 deletions

View File

@ -159,18 +159,17 @@ static void fill_console_output( HANDLE handle, int i, int j, int len, CHAR_INFO
/* helper function for GetLargestConsoleWindowSize */ /* helper function for GetLargestConsoleWindowSize */
static COORD get_largest_console_window_size( HANDLE handle ) static COORD get_largest_console_window_size( HANDLE handle )
{ {
struct condrv_output_info info;
COORD c = { 0, 0 }; COORD c = { 0, 0 };
SERVER_START_REQ( get_console_output_info ) if (!DeviceIoControl( handle, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, &info, sizeof(info), NULL, NULL ))
{ {
req->handle = console_handle_unmap( handle ); SetLastError( ERROR_INVALID_HANDLE );
if (!wine_server_call_err( req )) return c;
{
c.X = reply->max_width;
c.Y = reply->max_height;
}
} }
SERVER_END_REQ;
c.X = info.max_width;
c.Y = info.max_height;
TRACE( "(%p), returning %dx%d\n", handle, c.X, c.Y ); TRACE( "(%p), returning %dx%d\n", handle, c.X, c.Y );
return c; return c;
} }