conhost: Implement IOCTL_CONDRV_SET_MODE.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e5bd1ba4ad
commit
21c99970f3
|
@ -3971,6 +3971,16 @@ static void test_pseudo_console_child(HANDLE input, HANDLE output)
|
||||||
ok(ret, "GetConsoleMode failed: %u\n", GetLastError());
|
ok(ret, "GetConsoleMode failed: %u\n", GetLastError());
|
||||||
ok(mode == (ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT), "mode = %x\n", mode);
|
ok(mode == (ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT), "mode = %x\n", mode);
|
||||||
|
|
||||||
|
ret = SetConsoleMode(output, mode & ~ENABLE_WRAP_AT_EOL_OUTPUT);
|
||||||
|
ok(ret, "SetConsoleMode failed: %u\n", GetLastError());
|
||||||
|
|
||||||
|
ret = GetConsoleMode(output, &mode);
|
||||||
|
ok(ret, "GetConsoleMode failed: %u\n", GetLastError());
|
||||||
|
ok(mode == ENABLE_PROCESSED_OUTPUT, "mode = %x\n", mode);
|
||||||
|
|
||||||
|
ret = SetConsoleMode(output, mode | ENABLE_WRAP_AT_EOL_OUTPUT);
|
||||||
|
ok(ret, "SetConsoleMode failed: %u\n", GetLastError());
|
||||||
|
|
||||||
test_console_title();
|
test_console_title();
|
||||||
test_WriteConsoleInputW(input);
|
test_WriteConsoleInputW(input);
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,6 +244,12 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case IOCTL_CONDRV_SET_MODE:
|
||||||
|
if (in_size != sizeof(unsigned int) || *out_size) return STATUS_INVALID_PARAMETER;
|
||||||
|
screen_buffer->mode = *(unsigned int *)in_data;
|
||||||
|
TRACE( "set %x mode\n", screen_buffer->mode );
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME( "unsupported ioctl %x\n", code );
|
FIXME( "unsupported ioctl %x\n", code );
|
||||||
return STATUS_NOT_SUPPORTED;
|
return STATUS_NOT_SUPPORTED;
|
||||||
|
|
Loading…
Reference in New Issue