Cygwin: pty: Speed up a little hooked Win32 API for pseudo console.
- Some Win32 APIs are hooked in pty code for pseudo console support. This causes slow down. This patch improves speed a little.
This commit is contained in:
parent
9c9b883aa8
commit
e9be4fc14f
|
@ -155,7 +155,9 @@ DEF_HOOK (PeekConsoleInputW);
|
||||||
#define CHK_CONSOLE_ACCESS(h) \
|
#define CHK_CONSOLE_ACCESS(h) \
|
||||||
{ \
|
{ \
|
||||||
DWORD dummy; \
|
DWORD dummy; \
|
||||||
if (!isHybrid && GetConsoleMode (h, &dummy)) \
|
if (!isHybrid \
|
||||||
|
&& GetFileType (h) == FILE_TYPE_CHAR \
|
||||||
|
&& GetConsoleMode (h, &dummy)) \
|
||||||
{ \
|
{ \
|
||||||
isHybrid = true; \
|
isHybrid = true; \
|
||||||
set_switch_to_pcon (); \
|
set_switch_to_pcon (); \
|
||||||
|
|
Loading…
Reference in New Issue