ensure raw_printf has visible output
Changes to be committed: modified: sys/winnt/nttty.c
This commit is contained in:
+6
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 nttty.c $NHDT-Date: 1454282169 2016/01/31 23:16:09 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.66 $ */
|
/* NetHack 3.6 nttty.c $NHDT-Date: 1454381842 2016/02/02 02:57:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.67 $ */
|
||||||
/* Copyright (c) NetHack PC Development Team 1993 */
|
/* Copyright (c) NetHack PC Development Team 1993 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -69,6 +69,7 @@ extern int redirect_stdout;
|
|||||||
int GUILaunched;
|
int GUILaunched;
|
||||||
/* Flag for whether unicode is supported */
|
/* Flag for whether unicode is supported */
|
||||||
static boolean has_unicode;
|
static boolean has_unicode;
|
||||||
|
static boolean init_ttycolor_completed;
|
||||||
#ifdef PORT_DEBUG
|
#ifdef PORT_DEBUG
|
||||||
static boolean display_cursor_info = FALSE;
|
static boolean display_cursor_info = FALSE;
|
||||||
#endif
|
#endif
|
||||||
@@ -727,6 +728,7 @@ init_ttycolor()
|
|||||||
ttycolors_inv[CLR_BRIGHT_CYAN] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY;
|
ttycolors_inv[CLR_BRIGHT_CYAN] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY;
|
||||||
ttycolors_inv[CLR_WHITE] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
|
ttycolors_inv[CLR_WHITE] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
|
||||||
| BACKGROUND_INTENSITY;
|
| BACKGROUND_INTENSITY;
|
||||||
|
init_ttycolor_completed = TRUE;
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR */
|
#endif /* TEXTCOLOR */
|
||||||
|
|
||||||
@@ -1025,6 +1027,9 @@ VA_DECL(const char *, fmt)
|
|||||||
if (redirect_stdout)
|
if (redirect_stdout)
|
||||||
fprintf(stdout, "%s", buf);
|
fprintf(stdout, "%s", buf);
|
||||||
else {
|
else {
|
||||||
|
if(!init_ttycolor_completed)
|
||||||
|
init_ttycolor();
|
||||||
|
|
||||||
xputs(buf);
|
xputs(buf);
|
||||||
if (ttyDisplay)
|
if (ttyDisplay)
|
||||||
curs(BASE_WINDOW, console.cursor.X + 1, console.cursor.Y);
|
curs(BASE_WINDOW, console.cursor.X + 1, console.cursor.Y);
|
||||||
|
|||||||
Reference in New Issue
Block a user