Author: emax
Date: Wed May 11 19:06:09 2011
New Revision: 221787
URL: http://svn.freebsd.org/changeset/base/221787

Log:
  MFC r221448
  
  Encode horizontal scroll events (AC Pan) as button presses (bit 5 and 6)
  
  Submitted by: David Demelier demelier dot david at gmail dot com

Modified:
  stable/8/usr.sbin/bluetooth/bthidd/hid.c
Directory Properties:
  stable/8/usr.sbin/bluetooth/bthidd/   (props changed)

Modified: stable/8/usr.sbin/bluetooth/bthidd/hid.c
==============================================================================
--- stable/8/usr.sbin/bluetooth/bthidd/hid.c    Wed May 11 18:58:56 2011        
(r221786)
+++ stable/8/usr.sbin/bluetooth/bthidd/hid.c    Wed May 11 19:06:09 2011        
(r221787)
@@ -229,6 +229,17 @@ hid_interrupt(bthid_session_p s, uint8_t
                                break;
 
                        switch (usage) {
+                       case HUC_AC_PAN:
+                               /* Horizontal scroll */
+                               if (val < 0)
+                                       mouse_butt |= (1 << 5);
+                               else
+                                       mouse_butt |= (1 << 6);
+
+                               mevents ++;
+                               val = 0;
+                               break;
+
                        case 0xb5: /* Scan Next Track */
                                val = 0x19;
                                break;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to