libConsole/cross_getch.c
changeset 69 b5912e5f899f
parent 53 6b3d7e3418c1
child 77 49e0babccb23
equal deleted inserted replaced
68:d549894aa6a9 69:b5912e5f899f
     7 
     7 
     8 int cross_getch ()
     8 int cross_getch ()
     9 {
     9 {
    10     int ch = -1;
    10     int ch = -1;
    11 
    11 
    12     while (!kbhit ()) {
    12     ch = getch ();
    13         ch = getch ();
       
    14     }
       
    15 
    13 
    16     return ch;
    14     return ch;
    17 }
    15 }
    18 
    16 
    19 #else
    17 #else