Jacek Caban : wineconsole: Use ReadConsoleOutputW in WINECON_FetchCells.
Alexandre Julliard
julliard at winehq.org
Mon Jul 27 16:35:14 CDT 2020
Module: wine
Branch: master
Commit: 29d5c6c476faa00529fe765150d014607da48f27
URL: https://source.winehq.org/git/wine.git/?a=commit;h=29d5c6c476faa00529fe765150d014607da48f27
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jul 24 20:39:58 2020 +0200
wineconsole: Use ReadConsoleOutputW in WINECON_FetchCells.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/wineconsole/wineconsole.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index ad3cd25bf5..75bb878bfd 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -66,19 +66,12 @@ static void WINECON_Usage(void)
*/
static void WINECON_FetchCells(struct inner_data* data, int upd_tp, int upd_bm)
{
- SERVER_START_REQ( read_console_output )
- {
- req->handle = wine_server_obj_handle( data->hConOut );
- req->x = 0;
- req->y = upd_tp;
- 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);
+ SMALL_RECT region = { 0, upd_tp, data->curcfg.sb_width - 1, upd_bm };
+ COORD size = { data->curcfg.sb_width, data->curcfg.sb_height };
+ COORD coord = { 0, upd_tp };
+
+ if (ReadConsoleOutputW(data->hConOut, data->cells, size, coord, ®ion))
+ data->fnRefresh(data, upd_tp, upd_bm);
}
/******************************************************************
More information about the wine-cvs
mailing list