Skip to content
Snippets Groups Projects
Commit 9874bc24 authored by rswindell's avatar rswindell
Browse files

Fixed od_get_key(bWait=FALSE) - bug reported by Evan Elias.

parent 1b393810
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,7 @@
* Mar 21, 1996 6.10 BP Added od_control_get().
* Sep 01, 1996 6.10 BP Update output area on od_set_per...().
* Oct 19, 2001 6.20 RS od_get_key now ignores linefeeds.
* Mar 14, 2002 6.22 RS Fixed od_get_key(bWait=FALSE)
*/
#define BUILDING_OPENDOORS
......@@ -423,20 +424,20 @@ ODAPIDEF char ODCALL od_get_key(BOOL bWait)
/* Call the OpenDoors kernel. */
CALL_KERNEL_IF_NEEDED();
/* If we aren't supposed to wait for input, then check whether any */
/* input is waiting in the input queue, and if not return right away */
/* without any data. */
if(!bWait)
{
if(!ODInQueueWaiting(hODInputQueue))
{
OD_API_EXIT();
return(0);
}
}
do {
/* If we aren't supposed to wait for input, then check whether any */
/* input is waiting in the input queue, and if not return right away */
/* without any data. */
if(!bWait)
{
if(!ODInQueueWaiting(hODInputQueue))
{
OD_API_EXIT();
return(0);
}
}
/* Obtain the next character from the input queue. If we get to this */
/* point and there is no data waiting in the input queue, then the */
/* ODInQueueGetNextEvent() function will block until a character */
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment