conhost: Call ensure_tty_input_thread in IOCTL_CONDRV_PEEK implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-10-01 15:08:40 +02:00 committed by Alexandre Julliard
parent 2ff55d97d7
commit 45b8489ba5
1 changed files with 1 additions and 0 deletions

View File

@ -2476,6 +2476,7 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
void *result; void *result;
TRACE( "peek\n "); TRACE( "peek\n ");
if (in_size) return STATUS_INVALID_PARAMETER; if (in_size) return STATUS_INVALID_PARAMETER;
ensure_tty_input_thread( console );
*out_size = min( *out_size, console->record_count * sizeof(INPUT_RECORD) ); *out_size = min( *out_size, console->record_count * sizeof(INPUT_RECORD) );
if (!(result = alloc_ioctl_buffer( *out_size ))) return STATUS_NO_MEMORY; if (!(result = alloc_ioctl_buffer( *out_size ))) return STATUS_NO_MEMORY;
if (*out_size) memcpy( result, console->records, *out_size ); if (*out_size) memcpy( result, console->records, *out_size );