win32tty: startup msg cleanup

the win32 cursor restriction stuff messed up any
messages displayed during abnormal start conditions
where the window system never got initialized properly.
among them:
- messages relating to lock files or games in progress
- dungeon errors
- early panic messages
This commit is contained in:
nethack.allison
2003-10-24 15:15:44 +00:00
parent 4ceb7c3743
commit 45dd5ffe9f
5 changed files with 94 additions and 5 deletions

View File

@@ -224,12 +224,38 @@ void Delay(int ms)
(void)Sleep(ms);
}
#ifdef WIN32CON
extern void NDECL(backsp);
#endif
void win32_abort()
{
#ifdef WIZARD
if (wizard)
DebugBreak();
int c, ci, ct;
if (wizard) {
# ifdef WIN32CON
if (!iflags.window_inited)
c = 'n';
ct = 0;
msmsg("Execute debug breakpoint wizard?");
while ((ci=nhgetch()) != '\n') {
if (ct > 0) {
backsp(); /* \b is visible on NT */
(void) putchar(' ');
backsp();
ct = 0;
c = 'n';
}
if (ci == 'y' || ci == 'n' || ci == 'Y' || ci == 'N') {
ct = 1;
c = ci;
msmsg("%c",c);
}
}
if (c == 'y')
DebugBreak();
}
# endif
#endif
abort();
}