From 0d64c3f1fd878e0a5f82c1fe5afd0689f7c69510 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 8 Sep 2026 09:21:29 -0400 Subject: [PATCH] attempt to fix a reported regression in consoletty.c --- sys/windows/consoletty.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/windows/consoletty.c b/sys/windows/consoletty.c index 93dd8a966..62b5cf28a 100644 --- a/sys/windows/consoletty.c +++ b/sys/windows/consoletty.c @@ -162,6 +162,8 @@ extern void (*ibmgraphics_mode_callback)(void); /* symbols.c */ extern void (*utf8graphics_mode_callback)(void); /* symbols.c */ #endif /* VIRTUAL_TERMINAL_SEQUENCES */ +static boolean OnWindows95_98_Me(void); + static void init_custom_colors(void); static void free_custom_colors(void); @@ -892,6 +894,12 @@ void buffer_write(cell_t * buffer, cell_t * cell, COORD pos) back_buffer_flip(); } +static boolean +OnWindows95_98_Me(void) +{ + return ((GetVersion() & 0x80000000) != 0); +} + /* * Called after returning from ! or ^Z */ @@ -2525,7 +2533,8 @@ void nethack_enter_consoletty(void) buffer_fill_to_end(console.back_buffer, &clear_cell, 0, 0); /* determine whether OS version has unicode support */ - console.has_unicode = (IsWindows8OrGreater()); + /* console.has_unicode = (IsWindows8OrGreater()); */ + console.has_unicode = !OnWindows95_98_Me(); #ifdef VIRTUAL_TERMINAL_SEQUENCES /* store the original code page*/