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
e43f5164
Commit
e43f5164
authored
Jul 01, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Return standard input handle in GetConsoleInputWaitHandle.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
99e6bab3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
console.c
dlls/kernel32/console.c
+1
-16
console.c
dlls/kernel32/tests/console.c
+12
-1
No files found.
dlls/kernel32/console.c
View file @
e43f5164
...
...
@@ -76,9 +76,6 @@ static CRITICAL_SECTION CONSOLE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };
static
const
WCHAR
coninW
[]
=
{
'C'
,
'O'
,
'N'
,
'I'
,
'N'
,
'$'
,
0
};
static
const
WCHAR
conoutW
[]
=
{
'C'
,
'O'
,
'N'
,
'O'
,
'U'
,
'T'
,
'$'
,
0
};
/* FIXME: this is not thread safe */
static
HANDLE
console_wait_event
;
/* map input records to ASCII */
static
void
input_records_WtoA
(
INPUT_RECORD
*
buffer
,
int
count
)
{
...
...
@@ -302,16 +299,7 @@ BOOL WINAPI CloseConsoleHandle(HANDLE handle)
*/
HANDLE
WINAPI
GetConsoleInputWaitHandle
(
void
)
{
if
(
!
console_wait_event
)
{
SERVER_START_REQ
(
get_console_wait_event
)
{
if
(
!
wine_server_call_err
(
req
))
console_wait_event
=
wine_server_ptr_handle
(
reply
->
event
);
}
SERVER_END_REQ
;
}
return
console_wait_event
;
return
GetStdHandle
(
STD_INPUT_HANDLE
);
}
...
...
@@ -630,9 +618,6 @@ BOOL WINAPI AllocConsole(void)
return
FALSE
;
}
/* invalidate local copy of input event handle */
console_wait_event
=
0
;
GetStartupInfoA
(
&
siCurrent
);
memset
(
&
siConsole
,
0
,
sizeof
(
siConsole
));
...
...
dlls/kernel32/tests/console.c
View file @
e43f5164
...
...
@@ -30,6 +30,8 @@ static HANDLE (WINAPI *pOpenConsoleW)(LPCWSTR,DWORD,BOOL,DWORD);
static
BOOL
(
WINAPI
*
pSetConsoleInputExeNameA
)(
LPCSTR
);
static
BOOL
(
WINAPI
*
pVerifyConsoleIoHandle
)(
HANDLE
handle
);
static
BOOL
skip_nt
;
/* DEFAULT_ATTRIB is used for all initial filling of the console.
* all modifications are made with TEST_ATTRIB so that we could check
* what has to be modified or not
...
...
@@ -1267,7 +1269,6 @@ static void test_CreateFileW(void)
UNICODE_STRING
string
;
IO_STATUS_BLOCK
iosb
;
NTSTATUS
status
;
BOOL
skip_nt
=
FALSE
;
for
(
index
=
0
;
index
<
ARRAY_SIZE
(
cf_table
);
index
++
)
{
...
...
@@ -3225,6 +3226,16 @@ static void test_FreeConsole(void)
ok
(
handle
==
INVALID_HANDLE_VALUE
&&
(
GetLastError
()
==
ERROR_INVALID_HANDLE
||
broken
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
/* winxp */
)),
"CreateFileA failed: %u
\n
"
,
GetLastError
());
if
(
!
skip_nt
)
{
SetStdHandle
(
STD_INPUT_HANDLE
,
(
HANDLE
)
0xdeadbeef
);
handle
=
GetConsoleInputWaitHandle
();
ok
(
handle
==
(
HANDLE
)
0xdeadbeef
,
"GetConsoleInputWaitHandle returned %p
\n
"
,
handle
);
SetStdHandle
(
STD_INPUT_HANDLE
,
NULL
);
handle
=
GetConsoleInputWaitHandle
();
ok
(
!
handle
,
"GetConsoleInputWaitHandle returned %p
\n
"
,
handle
);
}
}
static
void
test_SetConsoleScreenBufferInfoEx
(
HANDLE
std_output
)
...
...
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