Win9x: Fixed waiting for key pressing before area scanning

This commit is contained in:
Ianos Gnatiuc 2006-01-15 09:06:02 +00:00
parent 2587aa049f
commit e3b8ef3ef9

View File

@ -41,6 +41,7 @@
#ifdef __WIN32__ #ifdef __WIN32__
#include <windows.h> #include <windows.h>
extern OSVERSIONINFO WinVer;
#endif #endif
#if defined(__UNIX__) && !defined(__USE_NCURSES__) #if defined(__UNIX__) && !defined(__USE_NCURSES__)
@ -1265,8 +1266,12 @@ gkey kbxget_raw(int mode) {
return k; 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 { else {