Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5a151b06
Commit
5a151b06
authored
Aug 24, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Implement IOCTL_CONDRV_SET_MODE.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2105602e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
console.c
dlls/kernel32/tests/console.c
+24
-7
conhost.c
programs/conhost/conhost.c
+6
-0
No files found.
dlls/kernel32/tests/console.c
View file @
5a151b06
...
...
@@ -3945,6 +3945,29 @@ static void test_AllocConsole(void)
CloseHandle
(
pipe_write
);
}
static
void
test_pseudo_console_child
(
HANDLE
input
)
{
DWORD
mode
;
BOOL
ret
;
ret
=
GetConsoleMode
(
input
,
&
mode
);
ok
(
ret
,
"GetConsoleMode failed: %u
\n
"
,
GetLastError
());
ok
(
mode
==
(
ENABLE_PROCESSED_INPUT
|
ENABLE_LINE_INPUT
|
ENABLE_ECHO_INPUT
|
ENABLE_MOUSE_INPUT
|
ENABLE_INSERT_MODE
|
ENABLE_QUICK_EDIT_MODE
|
ENABLE_EXTENDED_FLAGS
|
ENABLE_AUTO_POSITION
),
"mode = %x
\n
"
,
mode
);
ret
=
SetConsoleMode
(
input
,
mode
&
~
ENABLE_AUTO_POSITION
);
ok
(
ret
,
"SetConsoleMode failed: %u
\n
"
,
GetLastError
());
ret
=
GetConsoleMode
(
input
,
&
mode
);
ok
(
ret
,
"GetConsoleMode failed: %u
\n
"
,
GetLastError
());
ok
(
mode
==
(
ENABLE_PROCESSED_INPUT
|
ENABLE_LINE_INPUT
|
ENABLE_ECHO_INPUT
|
ENABLE_MOUSE_INPUT
|
ENABLE_INSERT_MODE
|
ENABLE_QUICK_EDIT_MODE
|
ENABLE_EXTENDED_FLAGS
),
"mode = %x
\n
"
,
mode
);
ret
=
SetConsoleMode
(
input
,
mode
|
ENABLE_AUTO_POSITION
);
ok
(
ret
,
"SetConsoleMode failed: %u
\n
"
,
GetLastError
());
}
static
DWORD
WINAPI
read_pipe_proc
(
void
*
handle
)
{
char
buf
[
64
];
...
...
@@ -4118,13 +4141,7 @@ START_TEST(console)
if
(
using_pseudo_console
)
{
DWORD
mode
;
ret
=
GetConsoleMode
(
hConIn
,
&
mode
);
ok
(
ret
,
"GetConsoleMode failed: %u
\n
"
,
GetLastError
());
ok
(
mode
==
(
ENABLE_PROCESSED_INPUT
|
ENABLE_LINE_INPUT
|
ENABLE_ECHO_INPUT
|
ENABLE_MOUSE_INPUT
|
ENABLE_INSERT_MODE
|
ENABLE_QUICK_EDIT_MODE
|
ENABLE_EXTENDED_FLAGS
|
ENABLE_AUTO_POSITION
),
"mode = %x
\n
"
,
mode
);
test_pseudo_console_child
(
hConIn
);
return
;
}
...
...
programs/conhost/conhost.c
View file @
5a151b06
...
...
@@ -67,6 +67,12 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
return
STATUS_SUCCESS
;
}
case
IOCTL_CONDRV_SET_MODE
:
if
(
in_size
!=
sizeof
(
unsigned
int
)
||
*
out_size
)
return
STATUS_INVALID_PARAMETER
;
console
->
mode
=
*
(
unsigned
int
*
)
in_data
;
TRACE
(
"set %x mode
\n
"
,
console
->
mode
);
return
STATUS_SUCCESS
;
default:
FIXME
(
"unsupported ioctl %x
\n
"
,
code
);
return
STATUS_NOT_SUPPORTED
;
...
...
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