wineconsole: Use ReadConsoleOutputW in WINECON_FetchCells.

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-24 20:39:58 +02:00 committed by Alexandre Julliard
parent 928fffee8d
commit 29d5c6c476
1 changed files with 6 additions and 13 deletions

View File

@ -66,18 +66,11 @@ static void WINECON_Usage(void)
*/ */
static void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm) static void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm)
{ {
SERVER_START_REQ( read_console_output ) SMALL_RECT region = { 0, upd_tp, data->curcfg.sb_width - 1, upd_bm };
{ COORD size = { data->curcfg.sb_width, data->curcfg.sb_height };
req->handle = wine_server_obj_handle( data->hConOut ); COORD coord = { 0, upd_tp };
req->x = 0;
req->y = upd_tp; if (ReadConsoleOutputW(data->hConOut, data->cells, size, coord, &region))
req->mode = CHAR_INFO_MODE_TEXTATTR;
req->wrap = TRUE;
wine_server_set_reply( req, &data->cells[upd_tp * data->curcfg.sb_width],
(upd_bm-upd_tp+1) * data->curcfg.sb_width * sizeof(CHAR_INFO) );
wine_server_call( req );
}
SERVER_END_REQ;
data->fnRefresh(data, upd_tp, upd_bm); data->fnRefresh(data, upd_tp, upd_bm);
} }