diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c index ff38bafe2c1..3f56bdb0cab 100644 --- a/programs/wineconsole/curses.c +++ b/programs/wineconsole/curses.c @@ -324,7 +324,7 @@ static void WCCURSES_ComputePositions(struct inner_data* data) data->curcfg.win_width, data->curcfg.win_height, x, y); pos.Left = pos.Top = 0; pos.Right = x - 1; pos.Bottom = y - 1; - SetConsoleWindowInfo(data->hConOut, FALSE, &pos); + SetConsoleWindowInfo(data->console, FALSE, &pos); return; /* we'll get called again upon event for new window size */ } if (PRIVATE(data)->pad) WCCURSES_PosCursor(data); diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index 67531c00451..44768451543 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c @@ -687,7 +687,7 @@ static void WCUSER_CopySelectionToClipboard(const struct inner_data* data) LPWSTR end; DWORD count; - ReadConsoleOutputCharacterW(data->hConOut, p, w - 1, c, &count); + ReadConsoleOutputCharacterW(data->console, p, w - 1, c, &count); /* strip spaces from the end of the line */ end = p + w - 1; diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 7e39ed5e51e..63fdb7e72fb 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -70,7 +70,7 @@ static void WINECON_FetchCells(struct inner_data* data, int upd_tp, int 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)) + if (ReadConsoleOutputW(data->console, data->cells, size, coord, ®ion)) data->fnRefresh(data, upd_tp, upd_bm); } @@ -186,7 +186,7 @@ static void WINECON_SetColors(struct inner_data *data, const struct config_data* params.info.popup_attr = cfg->popup_attr; memcpy(params.info.color_map, cfg->color_map, sizeof(cfg->color_map)); - DeviceIoControl(data->hConOut, IOCTL_CONDRV_SET_OUTPUT_INFO, ¶ms, sizeof(params), NULL, 0, NULL, NULL); + DeviceIoControl(data->console, IOCTL_CONDRV_SET_OUTPUT_INFO, ¶ms, sizeof(params), NULL, 0, NULL, NULL); } /****************************************************************** @@ -383,11 +383,11 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf * (no notification is sent when invariant operation is requested) */ cinfo.bVisible = !cfg->cursor_visible; - SetConsoleCursorInfo(data->hConOut, &cinfo); + SetConsoleCursorInfo(data->console, &cinfo); /* */ cinfo.bVisible = cfg->cursor_visible; /* this shall update (through notif) curcfg */ - SetConsoleCursorInfo(data->hConOut, &cinfo); + SetConsoleCursorInfo(data->console, &cinfo); } if (data->curcfg.history_size != cfg->history_size) { @@ -425,7 +425,7 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf params->info.font_weight = cfg->font_weight; params->info.font_pitch_family = cfg->font_pitch_family; memcpy(params + 1, cfg->face_name, len * sizeof(WCHAR)); - DeviceIoControl(data->hConOut, IOCTL_CONDRV_SET_OUTPUT_INFO, params, sizeof(*params) + len * sizeof(WCHAR), + DeviceIoControl(data->console, IOCTL_CONDRV_SET_OUTPUT_INFO, params, sizeof(*params) + len * sizeof(WCHAR), NULL, 0, NULL, NULL); } } @@ -436,8 +436,8 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf data->curcfg.def_attr = cfg->def_attr; screen_size = cfg->win_width * (cfg->win_height + 1); - FillConsoleOutputAttribute(data->hConOut, cfg->def_attr, screen_size, top_left, &written); - SetConsoleTextAttribute(data->hConOut, cfg->def_attr); + FillConsoleOutputAttribute(data->console, cfg->def_attr, screen_size, top_left, &written); + SetConsoleTextAttribute(data->console, cfg->def_attr); } WINECON_SetColors(data, cfg); /* now let's look at the window / sb size changes... @@ -454,13 +454,13 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf #define ChgSBfWidth() do {c.X = cfg->sb_width; \ c.Y = data->curcfg.sb_height;\ - SetConsoleScreenBufferSize(data->hConOut, c);\ + SetConsoleScreenBufferSize(data->console, c);\ } while (0) #define ChgWinHPos() do {pos.Left = cfg->win_pos.X - data->curcfg.win_pos.X; \ pos.Top = 0; \ pos.Right = pos.Left + cfg->win_width - data->curcfg.win_width; \ pos.Bottom = 0; \ - SetConsoleWindowInfo(data->hConOut, FALSE, &pos);\ + SetConsoleWindowInfo(data->console, FALSE, &pos);\ } while (0) #define TstSBfHeight() (data->curcfg.sb_height != cfg->sb_height) #define TstWinVPos() (data->curcfg.win_height != cfg->win_height || data->curcfg.win_pos.Y != cfg->win_pos.Y) @@ -468,13 +468,13 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf /* since we're going to apply height after width is done, we use width as defined * in cfg, and not in data->curcfg because if won't be updated yet */ #define ChgSBfHeight() do {c.X = cfg->sb_width; c.Y = cfg->sb_height; \ - SetConsoleScreenBufferSize(data->hConOut, c); \ + SetConsoleScreenBufferSize(data->console, c); \ } while (0) #define ChgWinVPos() do {pos.Left = 0; \ pos.Top = cfg->win_pos.Y - data->curcfg.win_pos.Y; \ pos.Right = 0; \ pos.Bottom = pos.Top + cfg->win_height - data->curcfg.win_height; \ - SetConsoleWindowInfo(data->hConOut, FALSE, &pos);\ + SetConsoleWindowInfo(data->console, FALSE, &pos);\ } while (0) do @@ -582,7 +582,7 @@ static BOOL WINECON_GetServerConfig(struct inner_data* data) data->curcfg.insert_mode = (mode & (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS)) == (ENABLE_INSERT_MODE|ENABLE_EXTENDED_FLAGS); - if (!DeviceIoControl(data->hConOut, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, + if (!DeviceIoControl(data->console, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, &output_info, sizeof(output_info), NULL, NULL)) return FALSE; data->curcfg.cursor_size = output_info.cursor_size;