Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/dev/wscons pullup 1.7->1.9 (christos): fix X server...



details:   https://anonhg.NetBSD.org/src/rev/4891e8831eb1
branches:  netbsd-1-4
changeset: 468821:4891e8831eb1
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Jun 21 16:31:30 1999 +0000

description:
pullup 1.7->1.9 (christos): fix X server bell pitch

diffstat:

 sys/dev/wscons/wsdisplay_compat_usl.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 7389be16a06c -r 4891e8831eb1 sys/dev/wscons/wsdisplay_compat_usl.c
--- a/sys/dev/wscons/wsdisplay_compat_usl.c     Mon Jun 21 16:30:00 1999 +0000
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c     Mon Jun 21 16:31:30 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_compat_usl.c,v 1.7 1999/01/29 22:24:24 drochner Exp $ */
+/* $NetBSD: wsdisplay_compat_usl.c,v 1.7.2.1 1999/06/21 16:31:30 perry Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -437,9 +437,17 @@
                req = WSKBDIO_COMPLEXBELL;
 #define d (*(int *)data)
                if (d) {
-                       bd.which = WSKBD_BELL_DOPITCH | WSKBD_BELL_DOPERIOD;
-                       bd.pitch = d & 0xffff; /* Hz */
-                       bd.period = d >> 16; /* ms */
+#define PCVT_SYSBEEPF  1193182
+                       if (d >> 16) {
+                               bd.which = WSKBD_BELL_DOPERIOD;
+                               bd.period = d >> 16; /* ms */
+                       }
+                       else
+                               bd.which = 0;
+                       if (d & 0xffff) {
+                               bd.which |= WSKBD_BELL_DOPITCH;
+                               bd.pitch = PCVT_SYSBEEPF/(d & 0xffff); /* Hz */
+                       }
                } else
                        bd.which = 0; /* default */
 #undef d



Home | Main Index | Thread Index | Old Index