Clean up win32 emergency exit handling a little
This commit is contained in:
@@ -384,10 +384,17 @@ char *name;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
boolean getreturn_disable;
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
getreturn(str)
|
getreturn(str)
|
||||||
const char *str;
|
const char *str;
|
||||||
{
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
if (getreturn_disable) return;
|
||||||
|
#endif
|
||||||
#ifdef TOS
|
#ifdef TOS
|
||||||
msmsg("Hit <Return> %s.", str);
|
msmsg("Hit <Return> %s.", str);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ tty_end_screen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern boolean getreturn_disable; /* from sys/share/pcsys.c */
|
||||||
|
|
||||||
static BOOL CtrlHandler(ctrltype)
|
static BOOL CtrlHandler(ctrltype)
|
||||||
DWORD ctrltype;
|
DWORD ctrltype;
|
||||||
{
|
{
|
||||||
@@ -174,6 +176,7 @@ DWORD ctrltype;
|
|||||||
case CTRL_CLOSE_EVENT:
|
case CTRL_CLOSE_EVENT:
|
||||||
case CTRL_LOGOFF_EVENT:
|
case CTRL_LOGOFF_EVENT:
|
||||||
case CTRL_SHUTDOWN_EVENT:
|
case CTRL_SHUTDOWN_EVENT:
|
||||||
|
getreturn_disable = TRUE;
|
||||||
#ifndef NOSAVEONHANGUP
|
#ifndef NOSAVEONHANGUP
|
||||||
hangup(0);
|
hangup(0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user