From 5f0ac6952a10bec3f5074186b1e2edd0964b3ca8 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 30 Mar 2014 15:46:02 +0000 Subject: [PATCH] [CRT] - Use PeekConsoleInput in kbhit because the input buffer should not be affected. Patch by Roy Tam CORE-8030 #resolve svn path=/trunk/; revision=62587 --- reactos/lib/sdk/crt/conio/kbhit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reactos/lib/sdk/crt/conio/kbhit.c b/reactos/lib/sdk/crt/conio/kbhit.c index 0f29390d82a..89e3f025bd8 100644 --- a/reactos/lib/sdk/crt/conio/kbhit.c +++ b/reactos/lib/sdk/crt/conio/kbhit.c @@ -15,8 +15,6 @@ static CRITICAL_SECTION CriticalSection; volatile BOOL CriticalSectionInitialized=FALSE; /* - * FIXME Initial keyboard char not detected on first punch - * * @implemented */ @@ -71,7 +69,7 @@ int _kbhit(void) return 0; } - if (!ReadConsoleInput(StdInputHandle, InputRecord, EventsRead, &NumberRead)) + if (!PeekConsoleInput(StdInputHandle, InputRecord, EventsRead, &NumberRead)) { free(InputRecord); LeaveCriticalSection(&CriticalSection);