1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-05 12:56:08 +00:00

Don't call sysbeep() in sc_bell() if either duration or pitch is zero.

Otherwise sysbeep() makes an annoying clicking sound on some systems.
'kbdcontrol -b off' just sets the duration and pitch to zero, it doesn't
set the QUIET_BELL flag.

Tested by:	SorAlx <soralx@cydem.zp.ua>
PR:		misc/41772
MFC after:	1 week
This commit is contained in:
John Baldwin 2003-03-24 15:56:00 +00:00
parent 07aa16ca83
commit c2fae87169
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112537

View File

@ -3547,7 +3547,7 @@ sc_bell(scr_stat *scp, int pitch, int duration)
if (scp != scp->sc->cur_scp)
scp->sc->blink_in_progress += 2;
blink_screen(scp->sc->cur_scp);
} else {
} else if (duration != 0 && pitch != 0) {
if (scp != scp->sc->cur_scp)
pitch *= 2;
sysbeep(pitch, duration);