server: Introduce IOCTL_CONDRV_SET_TITLE ioctl.

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-21 14:56:42 +02:00 committed by Alexandre Julliard
parent 2cfc85dc55
commit cb28c2dbb0
2 changed files with 22 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES) #define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_SET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 14, METHOD_BUFFERED, FILE_WRITE_PROPERTIES) #define IOCTL_CONDRV_SET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 14, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
#define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 15, METHOD_BUFFERED, FILE_READ_PROPERTIES) #define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 15, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_SET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 16, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
/* console output ioctls */ /* console output ioctls */
#define IOCTL_CONDRV_GET_OUTPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 32, METHOD_BUFFERED, FILE_READ_PROPERTIES) #define IOCTL_CONDRV_GET_OUTPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 32, METHOD_BUFFERED, FILE_READ_PROPERTIES)

View File

@ -1610,6 +1610,27 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
if (!console->title_len) return 1; if (!console->title_len) return 1;
return set_reply_data( console->title, min( console->title_len, get_reply_max_size() )) != NULL; return set_reply_data( console->title, min( console->title_len, get_reply_max_size() )) != NULL;
case IOCTL_CONDRV_SET_TITLE:
{
data_size_t len = get_req_data_size();
struct condrv_renderer_event evt;
WCHAR *title = NULL;
if (len % sizeof(WCHAR))
{
set_error( STATUS_INVALID_PARAMETER );
return 0;
}
if (len && !(title = memdup( get_req_data(), len ))) return 0;
free( console->title );
console->title = title;
console->title_len = len;
evt.event = CONSOLE_RENDERER_TITLE_EVENT;
console_input_events_append( console, &evt );
return 1;
}
default: default:
set_error( STATUS_INVALID_HANDLE ); set_error( STATUS_INVALID_HANDLE );
return 0; return 0;