[CRT]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 30 Mar 2014 15:46:02 +0000 (15:46 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 30 Mar 2014 15:46:02 +0000 (15:46 +0000)
- 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

index 0f29390..89e3f02 100644 (file)
@@ -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);