Clean up win32 emergency exit handling a little

This commit is contained in:
nethack.allison
2002-07-01 12:32:57 +00:00
parent 47d32c6e45
commit 8d0b3091cb
2 changed files with 10 additions and 0 deletions

View File

@@ -384,10 +384,17 @@ char *name;
return;
}
#ifdef WIN32
boolean getreturn_disable;
#endif
void
getreturn(str)
const char *str;
{
#ifdef WIN32
if (getreturn_disable) return;
#endif
#ifdef TOS
msmsg("Hit <Return> %s.", str);
#else

View File

@@ -164,6 +164,8 @@ tty_end_screen()
}
}
extern boolean getreturn_disable; /* from sys/share/pcsys.c */
static BOOL CtrlHandler(ctrltype)
DWORD ctrltype;
{
@@ -174,6 +176,7 @@ DWORD ctrltype;
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
getreturn_disable = TRUE;
#ifndef NOSAVEONHANGUP
hangup(0);
#endif