Commit eff42369 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wineconsole: Use IOCTL_CONDRV_GET_INPUT_INFO in WINECON_GetServerConfig.

parent 33190b69
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
/* IOCTL_CONDRV_GET_INPUT_INFO result */ /* IOCTL_CONDRV_GET_INPUT_INFO result */
struct condrv_input_info struct condrv_input_info
{ {
unsigned int history_mode; /* whether we duplicate lines in history */
unsigned int history_size; /* number of lines in history */
unsigned int edition_mode; /* index to the edition mode flavors */
unsigned int input_count; /* number of available input records */ unsigned int input_count; /* number of available input records */
}; };
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "winecon_private.h" #include "winecon_private.h"
#include "winnls.h" #include "winnls.h"
#include "winuser.h" #include "winuser.h"
#include "wine/condrv.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -603,19 +604,16 @@ static void WINECON_Delete(struct inner_data* data) ...@@ -603,19 +604,16 @@ static void WINECON_Delete(struct inner_data* data)
*/ */
static BOOL WINECON_GetServerConfig(struct inner_data* data) static BOOL WINECON_GetServerConfig(struct inner_data* data)
{ {
struct condrv_input_info input_info;
BOOL ret; BOOL ret;
DWORD mode; DWORD mode;
SERVER_START_REQ(get_console_input_info) if (!DeviceIoControl(data->hConIn, IOCTL_CONDRV_GET_INPUT_INFO, NULL, 0,
{ &input_info, sizeof(input_info), NULL, NULL))
req->handle = wine_server_obj_handle( data->hConIn ); return FALSE;
ret = !wine_server_call_err( req ); data->curcfg.history_size = input_info.history_size;
data->curcfg.history_size = reply->history_size; data->curcfg.history_nodup = input_info.history_mode;
data->curcfg.history_nodup = reply->history_mode; data->curcfg.edition_mode = input_info.edition_mode;
data->curcfg.edition_mode = reply->edition_mode;
}
SERVER_END_REQ;
if (!ret) return FALSE;
GetConsoleMode(data->hConIn, &mode); GetConsoleMode(data->hConIn, &mode);
data->curcfg.insert_mode = (mode & (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS)) == data->curcfg.insert_mode = (mode & (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS)) ==
......
...@@ -1554,7 +1554,10 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ...@@ -1554,7 +1554,10 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async
set_error( STATUS_INVALID_PARAMETER ); set_error( STATUS_INVALID_PARAMETER );
return 0; return 0;
} }
info.input_count = console->recnum; info.history_mode = console->history_mode;
info.history_size = console->history_size;
info.edition_mode = console->edition_mode;
info.input_count = console->recnum;
return set_reply_data( &info, sizeof(info) ) != NULL; return set_reply_data( &info, sizeof(info) ) != NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment