kernelbase: Use IOCTL_CONDRV_GET_OUTPUT_INFO in GetConsoleCursorInfo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d25a267978
commit
547855e623
|
@ -541,26 +541,22 @@ UINT WINAPI DECLSPEC_HOTPATCH GetConsoleCP(void)
|
|||
*/
|
||||
BOOL WINAPI DECLSPEC_HOTPATCH GetConsoleCursorInfo( HANDLE handle, CONSOLE_CURSOR_INFO *info )
|
||||
{
|
||||
BOOL ret;
|
||||
struct condrv_output_info condrv_info;
|
||||
|
||||
SERVER_START_REQ( get_console_output_info )
|
||||
if (!DeviceIoControl( handle, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, &condrv_info, sizeof(condrv_info), NULL, NULL ))
|
||||
{
|
||||
req->handle = console_handle_unmap( handle );
|
||||
ret = !wine_server_call_err( req );
|
||||
if (ret && info)
|
||||
{
|
||||
info->dwSize = reply->cursor_size;
|
||||
info->bVisible = reply->cursor_visible;
|
||||
SetLastError( ERROR_INVALID_HANDLE );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
if (!ret) return FALSE;
|
||||
if (!info)
|
||||
{
|
||||
SetLastError( ERROR_INVALID_ACCESS );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
info->dwSize = condrv_info.cursor_size;
|
||||
info->bVisible = condrv_info.cursor_visible;
|
||||
TRACE("(%p) returning (%d,%d)\n", handle, info->dwSize, info->bVisible);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue