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
3c9d10d7
Commit
3c9d10d7
authored
Aug 20, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Implement IOCTL_CONDRV_GET_MODE.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8231dbf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
console.c
dlls/kernel32/tests/console.c
+0
-2
conhost.c
programs/conhost/conhost.c
+22
-2
No files found.
dlls/kernel32/tests/console.c
View file @
3c9d10d7
...
...
@@ -4121,9 +4121,7 @@ START_TEST(console)
DWORD
mode
;
ret
=
GetConsoleMode
(
hConIn
,
&
mode
);
todo_wine
ok
(
ret
,
"GetConsoleMode failed: %u
\n
"
,
GetLastError
());
todo_wine
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
);
...
...
programs/conhost/conhost.c
View file @
3c9d10d7
...
...
@@ -25,6 +25,7 @@
#include <winuser.h>
#include <winternl.h>
#include "wine/condrv.h"
#include "wine/server.h"
#include "wine/debug.h"
...
...
@@ -33,6 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(conhost);
struct
console
{
HANDLE
server
;
/* console server handle */
unsigned
int
mode
;
/* input mode */
};
static
void
*
ioctl_buffer
;
...
...
@@ -53,8 +55,22 @@ static void *alloc_ioctl_buffer( size_t size )
static
NTSTATUS
console_input_ioctl
(
struct
console
*
console
,
unsigned
int
code
,
const
void
*
in_data
,
size_t
in_size
,
size_t
*
out_size
)
{
FIXME
(
"unsupported ioctl %x
\n
"
,
code
);
return
STATUS_NOT_SUPPORTED
;
switch
(
code
)
{
case
IOCTL_CONDRV_GET_MODE
:
{
DWORD
*
mode
;
TRACE
(
"returning mode %x
\n
"
,
console
->
mode
);
if
(
in_size
||
*
out_size
!=
sizeof
(
*
mode
))
return
STATUS_INVALID_PARAMETER
;
if
(
!
(
mode
=
alloc_ioctl_buffer
(
*
out_size
)))
return
STATUS_NO_MEMORY
;
*
mode
=
console
->
mode
;
return
STATUS_SUCCESS
;
}
default:
FIXME
(
"unsupported ioctl %x
\n
"
,
code
);
return
STATUS_NOT_SUPPORTED
;
}
}
static
NTSTATUS
process_console_ioctls
(
struct
console
*
console
)
...
...
@@ -162,6 +178,10 @@ int __cdecl wmain(int argc, WCHAR *argv[])
for
(
i
=
0
;
i
<
argc
;
i
++
)
TRACE
(
"%s "
,
wine_dbgstr_w
(
argv
[
i
]));
TRACE
(
"
\n
"
);
console
.
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
;
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
!
wcscmp
(
argv
[
i
],
L"--headless"
))
...
...
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