SAFERHANGUP support for win32tty

win32gui support still needs to be developed.
This commit is contained in:
nethack.allison
2003-09-19 11:22:00 +00:00
parent 22fe9838f3
commit 018123c007
5 changed files with 44 additions and 6 deletions
+7 -1
View File
@@ -455,11 +455,17 @@ int *mod;
boolean numpad;
coord *cc;
{
#if defined(SAFERHANGUP)
DWORD dwWait;
#endif
int ch;
boolean valid = 0, done = 0;
while (!done) {
*count = 0;
WaitForSingleObject(hConIn, INFINITE);
dwWait = WaitForSingleObject(hConIn, INFINITE);
#if defined(SAFERHANGUP)
if (dwWait == WAIT_FAILED) return '\033';
#endif
PeekConsoleInput(hConIn,ir,1,count);
if (mode == 0) {
if ((ir->EventType == KEY_EVENT) && ir->Event.KeyEvent.bKeyDown) {