Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6695ca86
Commit
6695ca86
authored
Jul 10, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Use IOCTL_CONDRV_SET_OUTPUT_INFO in WINECON_SetConfig.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
07194e92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
wineconsole.c
programs/wineconsole/wineconsole.c
+13
-12
No files found.
programs/wineconsole/wineconsole.c
View file @
6695ca86
...
...
@@ -454,23 +454,24 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
data
->
curcfg
.
cell_height
!=
cfg
->
cell_height
||
data
->
curcfg
.
font_pitch_family
!=
cfg
->
font_pitch_family
||
data
->
curcfg
.
font_weight
!=
cfg
->
font_weight
)
{
struct
condrv_output_info_params
*
params
;
size_t
len
=
lstrlenW
(
cfg
->
face_name
);
RECT
r
;
data
->
fnSetFont
(
data
,
cfg
->
face_name
,
cfg
->
cell_height
,
cfg
->
font_weight
);
SystemParametersInfoW
(
SPI_GETWORKAREA
,
0
,
&
r
,
0
);
SERVER_START_REQ
(
set_console_output_info
)
if
((
params
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
params
)
+
len
*
sizeof
(
WCHAR
)))
)
{
req
->
handle
=
wine_server_obj_handle
(
data
->
hConOut
)
;
req
->
mask
=
SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
|
SET_CONSOLE_OUTPUT_INFO_FONT
;
req
->
max_width
=
(
r
.
right
-
r
.
left
)
/
cfg
->
cell_width
;
req
->
max_height
=
(
r
.
bottom
-
r
.
top
-
GetSystemMetrics
(
SM_CYCAPTION
))
/
cfg
->
cell_height
;
req
->
font_width
=
cfg
->
cell_width
;
req
->
font_height
=
cfg
->
cell_h
eight
;
req
->
font_weight
=
cfg
->
font_weight
;
req
->
font_pitch_family
=
cfg
->
font_pitch_family
;
wine_server_add_data
(
req
,
cfg
->
face_name
,
lstrlenW
(
cfg
->
face_name
)
*
sizeof
(
WCHAR
)
);
wine_server_call
(
req
);
params
->
mask
=
SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
|
SET_CONSOLE_OUTPUT_INFO_FONT
;
params
->
info
.
max_width
=
(
r
.
right
-
r
.
left
)
/
cfg
->
cell_width
;
params
->
info
.
max_height
=
(
r
.
bottom
-
r
.
top
-
GetSystemMetrics
(
SM_CYCAPTION
))
/
cfg
->
cell_height
;
params
->
info
.
font_width
=
cfg
->
cell_width
;
params
->
info
.
font_height
=
cfg
->
cell_height
;
params
->
info
.
font_weight
=
cfg
->
font_w
eight
;
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
),
NULL
,
0
,
NULL
,
NULL
);
}
SERVER_END_REQ
;
}
if
(
data
->
curcfg
.
def_attr
!=
cfg
->
def_attr
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment