From e3b8ef3ef95d0c9ad1f36c8130cb0ae7b24f0310 Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Sun, 15 Jan 2006 09:06:02 +0000 Subject: [PATCH] Win9x: Fixed waiting for key pressing before area scanning --- goldlib/gall/gkbdbase.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/goldlib/gall/gkbdbase.cpp b/goldlib/gall/gkbdbase.cpp index 861a49f..80b550f 100644 --- a/goldlib/gall/gkbdbase.cpp +++ b/goldlib/gall/gkbdbase.cpp @@ -41,6 +41,7 @@ #ifdef __WIN32__ #include +extern OSVERSIONINFO WinVer; #endif #if defined(__UNIX__) && !defined(__USE_NCURSES__) @@ -1265,8 +1266,12 @@ gkey kbxget_raw(int mode) { return k; } } - // Discard other events - ReadConsoleInput(gkbd_hin, &inp, 1, &nread); + + if ((inp.EventType != MOUSE_EVENT) || (WinVer.dwPlatformId == VER_PLATFORM_WIN32_NT)) + { + // Discard other events + ReadConsoleInput(gkbd_hin, &inp, 1, &nread); + } } } else {