- Timestamp:
- Feb 19, 2015 12:57:35 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/PS2M.cpp
r54271 r54289 242 242 /** Instantaneous button data. */ 243 243 uint32_t fCurrB; 244 /** Button state last sent to the guest. */ 245 uint32_t fReportedB; 244 246 /** Throttling delay in milliseconds. */ 245 247 uint32_t uThrottleDelay; 246 uint32_t Alignment0;247 248 248 249 /** The device critical section protecting everything - R3 Ptr */ … … 458 459 /* Event queue, eccumulators, and button status bits are cleared. */ 459 460 ps2kClearQueue((GeneriQ *)&pThis->evtQ); 460 pThis->iAccumX = pThis->iAccumY = pThis->iAccumZ = pThis->fAccumB = pThis->fCurrB = 0;461 pThis->iAccumX = pThis->iAccumY = pThis->iAccumZ = pThis->fAccumB; 461 462 } 462 463 … … 541 542 } 542 543 543 /* Clear the movement accumulators . */544 /* Clear the movement accumulators, but not necessarily button state. */ 544 545 pThis->iAccumX = pThis->iAccumY = pThis->iAccumZ = 0; 545 546 /* Clear accumulated button state only when it's being used. */ 546 547 if (fAccumBtns) 547 pThis->fAccumB = 0; 548 { 549 pThis->fReportedB = pThis->fAccumB; 550 pThis->fAccumB = 0; 551 } 548 552 } 549 553 … … 778 782 #else 779 783 /* If more movement is accumulated, report it and restart the timer. */ 780 uHaveEvents = pThis->iAccumX | pThis->iAccumY | pThis->iAccumZ | pThis->fAccumB;784 uHaveEvents = pThis->iAccumX | pThis->iAccumY | pThis->iAccumZ | (pThis->fCurrB != pThis->fReportedB); 781 785 LogFlowFunc(("Have%s events\n", uHaveEvents ? "" : " no")); 782 786
Note:
See TracChangeset
for help on using the changeset viewer.