this seems to be the proper way under ms, but it won't work under wine
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- 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