win32tty: prevent early messages from flashing by unseen

This commit is contained in:
nethack.allison
2005-01-15 14:04:03 +00:00
parent b064510a9b
commit 7b83a76bff
3 changed files with 17 additions and 1 deletions

View File

@@ -151,6 +151,7 @@ extern void FDECL(nttty_preference_update, (const char *));
extern void NDECL(toggle_mouse_support);
extern void FDECL(map_subkeyvalue, (char *));
extern void NDECL(load_keyboard_handler);
extern void NDECL(raw_clear_screen);
#endif
#include <fcntl.h>

View File

@@ -105,6 +105,7 @@ char *argv[];
register char *dir;
#if defined(WIN32)
char fnamebuf[BUFSZ], encodedfnamebuf[BUFSZ];
boolean save_getreturn_status;
#endif
#ifdef NOCWD_ASSUMPTIONS
char failbuf[BUFSZ];
@@ -172,6 +173,11 @@ char *argv[];
chdirx(HACKDIR, 1);
# endif
ami_wininit_data();
#endif
#ifdef WIN32CON
save_getreturn_status = getreturn_enabled;
raw_clear_screen();
getreturn_enabled = TRUE;
#endif
initoptions();
@@ -243,6 +249,9 @@ char *argv[];
}
}
#ifdef WIN32
getreturn_enabled = save_getreturn_status;
#endif
/*
* It seems you really want to play.
*/

View File

@@ -498,7 +498,7 @@ cl_end()
void
clear_screen()
raw_clear_screen()
{
if (GetConsoleScreenBufferInfo(hConOut,&csbi)) {
DWORD ccnt;
@@ -514,6 +514,12 @@ clear_screen()
csbi.dwSize.X * csbi.dwSize.Y,
newcoord, &ccnt);
}
}
void
clear_screen()
{
raw_clear_screen();
home();
}