]> granicus.if.org Git - nethack/commitdiff
adjust some disabled code in curses window port
authornhmall <nhmall@nethack.org>
Tue, 5 Jan 2021 21:06:58 +0000 (16:06 -0500)
committernhmall <nhmall@nethack.org>
Tue, 5 Jan 2021 21:06:58 +0000 (16:06 -0500)
win/curses/cursdial.c
win/curses/cursinvt.c

index e5a8fc5a06e9d1f60d3e7d0fbad226aef4f2d10a..cee28b7ac5c9da8515ca485872444338548fbc79 100644 (file)
@@ -621,8 +621,7 @@ curses_add_nhmenu_item(winid wid, const glyph_info *glyphinfo,
     }
 
     new_item = curs_new_menu_item(wid, str);
-    if (glyphinfo)
-        new_item->glyphinfo = *glyphinfo;
+    new_item->glyphinfo = *glyphinfo;
     new_item->identifier = *identifier;
     new_item->accelerator = accelerator;
     new_item->group_accel = group_accel;
@@ -1039,7 +1038,8 @@ menu_win_size(nhmenu *menu)
             /* Add space for accelerator (selector letter) */
             curentrywidth += 4;
 #if 0 /* FIXME: menu glyphs */
-            if (menu_item_ptr->glyph != NO_GLYPH && iflags.use_menu_glyphs)
+            if (menu_item_ptr->glyphinfo.glyph != NO_GLYPH
+                && iflags.use_menu_glyphs)
                 curentrywidth += 2;
 #endif
         }
index 0906763de48cf6d634063e8ab574e98b00a7c0df..bfbf04a626b33e1ec9c6be57f285614163a27048 100644 (file)
@@ -118,7 +118,8 @@ curses_add_inv(int y, const glyph_info *glyphinfo UNUSED, CHAR_P accelerator,
             stroffset = 4;
     }
 #if 0 /* FIXME: MENU GLYPHS */
-    if (accelerator && glyph != NO_GLYPH && iflags.use_menu_glyphs) {
+    if (accelerator && iflags.use_menu_glyphs
+            && glyphinfo->glyph != NO_GLYPH ) {
         int symbol;
         attr_t glyphclr;