VirtualBox

Changeset 47768 in vbox


Ignore:
Timestamp:
Aug 15, 2013 2:11:01 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88027
Message:

Devices/Input: add horizontal scrolling to the USB mouse device.

Location:
trunk/src/VBox/Devices/Input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/UsbMouse.cpp

    r47727 r47768  
    132132            int32_t     dy;
    133133            int32_t     dz;
     134            int32_t     dw;
    134135        } Relative;
    135136        struct
     
    245246    int8_t      dy;
    246247    int8_t      dz;
     248    int8_t      dw;
    247249} USBHIDM_REPORT, *PUSBHIDM_REPORT;
    248250
     
    385387    /* Usage */                     0x09, 0x31,     /* Y */
    386388    /* Usage */                     0x09, 0x38,     /* Z (wheel) */
     389    /* Usage Page */                0x05, 0x0C,     /* Consumer Devices */
     390    /* Usage */                     0x0A, 0x38, 0x02,/* AC Pan (horizontal wheel) */
    387391    /* Logical Minimum */           0x15, 0x81,     /* -127 */
    388392    /* Logical Maximum */           0x25, 0x7F,     /* +127 */
    389393    /* Report Size */               0x75, 0x08,     /* 8 */
    390     /* Report Count */              0x95, 0x03,     /* 3 */
     394    /* Report Count */              0x95, 0x04,     /* 4 */
    391395    /* Input */                     0x81, 0x06,     /* Data, Value, Relative, Bit field */
    392396    /* End Collection */            0xC0,
     
    12081212        pReport->m.dy       = clamp_i8(pAccumulated->u.Relative.dy);
    12091213        pReport->m.dz       = clamp_i8(pAccumulated->u.Relative.dz);
     1214        pReport->m.dw       = clamp_i8(pAccumulated->u.Relative.dw);
    12101215   
    12111216        cbCopy = sizeof(pReport->m);
    1212         LogRel3(("Rel event, dx=%d, dy=%d, dz=%d, fButtons=%02x, report size %d\n",
    1213                  pReport->m.dx, pReport->m.dy, pReport->m.dz,
     1217        LogRel3(("Rel event, dx=%d, dy=%d, dz=%d, dw=%d, fButtons=%02x, report size %d\n",
     1218                 pReport->m.dx, pReport->m.dy, pReport->m.dz, pReport->m.dw,
    12141219                 pReport->m.fButtons, cbCopy));
    12151220        break;
     
    14351440    pThis->PtrDelta.u.Relative.dy      += dy;
    14361441    pThis->PtrDelta.u.Relative.dz      -= dz;    /* Inverted! */
     1442    pThis->PtrDelta.u.Relative.dw      += dw;
    14371443
    14381444    /* Send a report if possible. */
  • trunk/src/VBox/Devices/Input/testcase/tstUsbMouse.cpp

    r47674 r47768  
    185185                    || Urb.abData[1] != 123  /* x */
    186186                    || Urb.abData[2] != 240  /* 256 - y */
    187                     || Urb.abData[3] != 255  /* z */)
     187                    || Urb.abData[3] != 255  /* z */
     188                    || Urb.abData[4] != 255  /* w */)
    188189                    rc = VERR_GENERAL_FAILURE;
    189190            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette