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
666c5b6e
Commit
666c5b6e
authored
Sep 14, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use IOCTL_CONDRV_READ_CONSOLE in ReadConsoleW when possible.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0cdb070b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
console.c
dlls/kernel32/console.c
+7
-0
console.c
server/console.c
+7
-3
No files found.
dlls/kernel32/console.c
View file @
666c5b6e
...
...
@@ -541,6 +541,13 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer,
return
FALSE
;
}
if
(
DeviceIoControl
(
hConsoleInput
,
IOCTL_CONDRV_READ_CONSOLE
,
NULL
,
0
,
lpBuffer
,
nNumberOfCharsToRead
*
sizeof
(
WCHAR
),
lpNumberOfCharsRead
,
NULL
))
{
*
lpNumberOfCharsRead
/=
sizeof
(
WCHAR
);
return
TRUE
;
}
if
(
!
GetConsoleMode
(
hConsoleInput
,
&
mode
))
return
FALSE
;
if
((
fd
=
get_console_bare_fd
(
hConsoleInput
))
!=
-
1
)
...
...
server/console.c
View file @
666c5b6e
...
...
@@ -1693,7 +1693,7 @@ static struct object *create_console_server( void )
static
int
is_blocking_read_ioctl
(
unsigned
int
code
)
{
return
code
==
IOCTL_CONDRV_READ_INPUT
;
return
code
==
IOCTL_CONDRV_READ_INPUT
||
code
==
IOCTL_CONDRV_READ_CONSOLE
;
}
static
int
console_input_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
)
...
...
@@ -1898,8 +1898,12 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
}
default:
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
if
(
!
console
->
server
||
code
>>
16
!=
FILE_DEVICE_CONSOLE
)
{
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
}
return
queue_host_ioctl
(
console
->
server
,
code
,
0
,
async
,
&
console
->
ioctl_q
);
}
}
...
...
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