# HG changeset patch # User Markus Bröker # Date 1229187496 -3600 # Node ID 7acfc5eda7ed2efdf96c13bb3fb9b6bf60ac9259 # Parent 0db9235d68d95a609ad13e202b61dae793249f23 this seems to be the proper way under ms, but it won't work under wine committer: Markus Bröker diff --git a/db_bridge/console.cpp b/db_bridge/console.cpp --- 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 #include #ifdef WIN32 -#include #include 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