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
33be1cf5
Commit
33be1cf5
authored
Sep 08, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Move console input processing into a separated function.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7712a48c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
conhost.c
programs/conhost/conhost.c
+14
-9
No files found.
programs/conhost/conhost.c
View file @
33be1cf5
...
...
@@ -396,9 +396,19 @@ static NTSTATUS read_console_input( struct console *console, size_t out_size )
return
STATUS_SUCCESS
;
}
static
NTSTATUS
process_console_input
(
struct
console
*
console
)
{
if
(
console
->
record_count
&&
console
->
pending_read
)
{
read_console_input
(
console
,
console
->
pending_read
);
console
->
pending_read
=
0
;
}
return
STATUS_SUCCESS
;
}
/* add input events to a console input queue */
static
NTSTATUS
write_console_input
(
struct
console
*
console
,
const
INPUT_RECORD
*
records
,
unsigned
int
count
)
unsigned
int
count
,
BOOL
flush
)
{
TRACE
(
"%u
\n
"
,
count
);
...
...
@@ -443,12 +453,7 @@ static NTSTATUS write_console_input( struct console *console, const INPUT_RECORD
}
}
console
->
record_count
+=
count
;
if
(
count
&&
console
->
pending_read
)
{
read_console_input
(
console
,
console
->
pending_read
);
console
->
pending_read
=
0
;
}
return
STATUS_SUCCESS
;
return
flush
?
process_console_input
(
console
)
:
STATUS_SUCCESS
;
}
static
NTSTATUS
screen_buffer_activate
(
struct
screen_buffer
*
screen_buffer
)
...
...
@@ -604,7 +609,7 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
ir
.
EventType
=
WINDOW_BUFFER_SIZE_EVENT
;
ir
.
Event
.
WindowBufferSizeEvent
.
dwSize
.
X
=
info
->
width
;
ir
.
Event
.
WindowBufferSizeEvent
.
dwSize
.
Y
=
info
->
height
;
write_console_input
(
screen_buffer
->
console
,
&
ir
,
1
);
write_console_input
(
screen_buffer
->
console
,
&
ir
,
1
,
TRUE
);
}
}
if
(
params
->
mask
&
SET_CONSOLE_OUTPUT_INFO_ATTR
)
...
...
@@ -1146,7 +1151,7 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
case
IOCTL_CONDRV_WRITE_INPUT
:
if
(
in_size
%
sizeof
(
INPUT_RECORD
)
||
*
out_size
)
return
STATUS_INVALID_PARAMETER
;
return
write_console_input
(
console
,
in_data
,
in_size
/
sizeof
(
INPUT_RECORD
)
);
return
write_console_input
(
console
,
in_data
,
in_size
/
sizeof
(
INPUT_RECORD
)
,
TRUE
);
case
IOCTL_CONDRV_PEEK
:
{
...
...
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