window-ports should respect flags.silent setting

Like tty_nhbell() in termcap.c, window-ports really should
respect the flags.silent setting.
This commit is contained in:
nhmall
2023-03-24 12:23:19 -04:00
parent a136dbac06
commit 07ba3904fd
4 changed files with 9 additions and 4 deletions
+2
View File
@@ -617,6 +617,8 @@ E. Misc. Routines
make_sound(???) -- To be determined later. THIS IS CURRENTLY UN-IMPLEMENTED. make_sound(???) -- To be determined later. THIS IS CURRENTLY UN-IMPLEMENTED.
nhbell() -- Beep at user. [This will exist at least until sounds are nhbell() -- Beep at user. [This will exist at least until sounds are
redone, since sounds aren't attributable to windows anyway.] redone, since sounds aren't attributable to windows anyway.]
Implementation should respect the flags.silent setting just
like the tty window-port does in tty_nhbell().
mark_synch() -- Don't go beyond this point in I/O on any channel until mark_synch() -- Don't go beyond this point in I/O on any channel until
all channels are caught up to here. Can be an empty call all channels are caught up to here. Can be an empty call
for the moment for the moment
+2 -1
View File
@@ -628,7 +628,8 @@ int NetHackQtBind::qt_nh_poskey(coordxy *x, coordxy *y, int *mod)
void NetHackQtBind::qt_nhbell() void NetHackQtBind::qt_nhbell()
{ {
QApplication::beep(); if (!::flags.silent)
QApplication::beep();
} }
int NetHackQtBind::qt_doprev_message() int NetHackQtBind::qt_doprev_message()
+2 -1
View File
@@ -977,7 +977,8 @@ nhbell() -- Beep at user. [This will exist at least until sounds are
void void
curses_nhbell(void) curses_nhbell(void)
{ {
beep(); if (!flags.silent)
beep();
} }
/* /*
+3 -2
View File
@@ -1481,12 +1481,13 @@ mswin_nh_poskey(coordxy *x, coordxy *y, int *mod)
/* /*
nhbell() -- Beep at user. [This will exist at least until sounds are nhbell() -- Beep at user. [This will exist at least until sounds are
redone, since sounds aren't attributable to windows redone, since sounds aren't attributable to windows anyway.]
anyway.]
*/ */
void void
mswin_nhbell(void) mswin_nhbell(void)
{ {
/* this currently does nothing, but if that ever changes, the setting
of flags.silent should be respected */
logDebug("mswin_nhbell()\n"); logDebug("mswin_nhbell()\n");
} }