changeset 23 | 7acfc5eda7ed |
parent 21 | 403742321c65 |
child 65 | 76514757b0d6 |
--- a/db_bridge/console.cpp +++ b/db_bridge/console.cpp @@ -1,22 +1,22 @@ +/** + * test/demos/db_bridge/console.cpp + * Copyright (C) Markus Broeker + */ + #include <console.h> #include <cstdio> #ifdef WIN32 -#include <windows.h> #include <conio.h> int Console::getch () { - int pressed = 0; int ch = -1; - while (!pressed) { - if (kbhit ()) { - ch =::getch (); - pressed = 1; - } - Sleep (10); + while (!kbhit ()) { + ch =::getch (); } + return ch; } #else