]> granicus.if.org Git - nethack/commitdiff
X11 topten display
authorPatR <rankin@nethack.org>
Fri, 28 Jan 2022 00:11:22 +0000 (16:11 -0800)
committerPatR <rankin@nethack.org>
Fri, 28 Jan 2022 00:11:22 +0000 (16:11 -0800)
Make the same change as was done for Qt three or so weeks ago:  force
the 'toptenwin' option on in X11_init_nhwdinows() so that scores (or
wizard mode "your score is ignored") are shown in a popup text window
instead of being sent to stdout.

win/X11/winX.c

index d0209ca64fbb427d70d54913369cc8bfdacafacf..0221e827175a81c9c734f40512c07f4ab8aa4ba4 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 winX.c  $NHDT-Date: 1641763627 2022/01/09 21:27:07 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.108 $ */
+/* NetHack 3.7 winX.c  $NHDT-Date: 1643328675 2022/01/28 00:11:15 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.109 $ */
 /* Copyright (c) Dean Luick, 1992                                 */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1506,6 +1506,12 @@ X11_init_nhwindows(int *argcp, char **argv)
     for (i = 0; i < MAX_WINDOWS; i++)
         window_list[i].type = NHW_NONE;
 
+    /* force high scores display to be shown in a window, and don't allow
+       that to be toggled off via 'O' (note: 'nethack -s' won't reach here;
+       its output goes to stdout and could be redirected into a file) */
+    iflags.toptenwin = TRUE;
+    set_option_mod_status("toptenwin", set_in_config);
+
     /* add another option that can be set */
     set_wc_option_mod_status(WC_TILED_MAP, set_in_game);
     set_option_mod_status("mouse_support", set_in_game);