Jacek Caban : kernelbase: Use IOCTL_CONDRV_GET_OUTPUT_INFO in GetLargestConsoleWindowSize.
Alexandre Julliard
julliard at winehq.org
Thu Jul 9 17:10:40 CDT 2020
Module: wine
Branch: master
Commit: d25a267978de5949a283c5f76405175316f8f773
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d25a267978de5949a283c5f76405175316f8f773
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jul 9 19:28:42 2020 +0200
kernelbase: Use IOCTL_CONDRV_GET_OUTPUT_INFO in GetLargestConsoleWindowSize.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernelbase/console.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index f5612de407..83cbce38d5 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -159,18 +159,17 @@ static void fill_console_output( HANDLE handle, int i, int j, int len, CHAR_INFO
/* helper function for GetLargestConsoleWindowSize */
static COORD get_largest_console_window_size( HANDLE handle )
{
+ struct condrv_output_info info;
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 );
- if (!wine_server_call_err( req ))
- {
- c.X = reply->max_width;
- c.Y = reply->max_height;
- }
+ SetLastError( ERROR_INVALID_HANDLE );
+ return c;
}
- SERVER_END_REQ;
+
+ c.X = info.max_width;
+ c.Y = info.max_height;
TRACE( "(%p), returning %dx%d\n", handle, c.X, c.Y );
return c;
}
More information about the wine-cvs
mailing list