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
279acf6a
Commit
279acf6a
authored
May 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Only read input from the stdin handle if it is a console.
parent
267d38e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
dosvm.c
dlls/winedos/dosvm.c
+10
-7
No files found.
dlls/winedos/dosvm.c
View file @
279acf6a
...
...
@@ -464,19 +464,18 @@ void WINAPI DOSVM_Wait( CONTEXT86 *waitctx )
DWORD
WINAPI
DOSVM_Loop
(
HANDLE
hThread
)
{
HANDLE
objs
[
2
];
int
count
=
0
;
MSG
msg
;
DWORD
waitret
;
objs
[
0
]
=
GetStdHandle
(
STD_INPUT_HANDLE
);
objs
[
1
]
=
hThread
;
objs
[
count
++
]
=
hThread
;
if
(
GetConsoleMode
(
GetStdHandle
(
STD_INPUT_HANDLE
),
NULL
))
objs
[
count
++
]
=
GetStdHandle
(
STD_INPUT_HANDLE
);
for
(;;)
{
TRACE_
(
int
)(
"waiting for action
\n
"
);
waitret
=
MsgWaitForMultipleObjects
(
2
,
objs
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
waitret
=
MsgWaitForMultipleObjects
(
count
,
objs
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
if
(
waitret
==
WAIT_OBJECT_0
)
{
DOSVM_ProcessConsole
();
}
else
if
(
waitret
==
WAIT_OBJECT_0
+
1
)
{
DWORD
rv
;
if
(
!
GetExitCodeThread
(
hThread
,
&
rv
))
{
ERR
(
"Failed to get thread exit code!
\n
"
);
...
...
@@ -484,7 +483,7 @@ DWORD WINAPI DOSVM_Loop( HANDLE hThread )
}
return
rv
;
}
else
if
(
waitret
==
WAIT_OBJECT_0
+
2
)
{
else
if
(
waitret
==
WAIT_OBJECT_0
+
count
)
{
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
hwnd
)
{
/* it's a window message */
...
...
@@ -513,6 +512,10 @@ DWORD WINAPI DOSVM_Loop( HANDLE hThread )
}
}
}
else
if
(
waitret
==
WAIT_OBJECT_0
+
1
)
{
DOSVM_ProcessConsole
();
}
else
{
ERR_
(
int
)(
"MsgWaitForMultipleObjects returned unexpected value.
\n
"
);
...
...
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