Clean up win32 emergency exit handling a little
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user