diff --git a/doc/window.txt b/doc/window.txt index b2ae5c304..51bbaacde 100644 --- a/doc/window.txt +++ b/doc/window.txt @@ -617,6 +617,8 @@ E. Misc. Routines make_sound(???) -- To be determined later. THIS IS CURRENTLY UN-IMPLEMENTED. nhbell() -- Beep at user. [This will exist at least until sounds are 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 all channels are caught up to here. Can be an empty call for the moment diff --git a/win/Qt/qt_bind.cpp b/win/Qt/qt_bind.cpp index 1c507efe5..4e87b7800 100644 --- a/win/Qt/qt_bind.cpp +++ b/win/Qt/qt_bind.cpp @@ -628,7 +628,8 @@ int NetHackQtBind::qt_nh_poskey(coordxy *x, coordxy *y, int *mod) void NetHackQtBind::qt_nhbell() { - QApplication::beep(); + if (!::flags.silent) + QApplication::beep(); } int NetHackQtBind::qt_doprev_message() diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 9386bc5ab..2c0c8a16a 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -977,7 +977,8 @@ nhbell() -- Beep at user. [This will exist at least until sounds are void curses_nhbell(void) { - beep(); + if (!flags.silent) + beep(); } /* diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index b3323507d..aed320e82 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -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 - redone, since sounds aren't attributable to windows -anyway.] + redone, since sounds aren't attributable to windows anyway.] */ 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"); }