- Timestamp:
- Jul 25, 2017 3:09:58 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117165
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/PS2M.cpp
r68100 r68109 597 597 598 598 LogFlowFunc(("cmd=0x%02X, active cmd=0x%02X\n", cmd, pThis->u8CurrCmd)); 599 //LogRel(("aux: cmd=0x%02X, active cmd=0x%02X\n", cmd, pThis->u8CurrCmd));600 599 601 600 if (pThis->enmMode == AUX_MODE_RESET) … … 802 801 } 803 802 LogFlowFunc(("Active cmd now 0x%02X; updating interrupts\n", pThis->u8CurrCmd)); 804 // KBCUpdateInterrupts(pThis->pParent);805 803 return VINF_SUCCESS; 806 804 } 807 805 808 806 /** 809 * Send a byte ( keystrokeor command response) to the keyboard controller.807 * Send a byte (packet data or command response) to the keyboard controller. 810 808 * 811 809 * @returns VINF_SUCCESS or VINF_TRY_AGAIN. … … 821 819 822 820 /* Anything in the command queue has priority over data 823 * in the event queue. Additionally, keystrokes are /// @todo true?821 * in the event queue. Additionally, packet data are 824 822 * blocked if a command is currently in progress, even if 825 823 * the command queue is empty. … … 831 829 832 830 LogFlowFunc(("mouse sends 0x%02x (%svalid data)\n", *pb, rc == VINF_SUCCESS ? "" : "not ")); 833 //if (rc == VINF_SUCCESS) LogRel(("aux: sends 0x%02X\n", *pb));834 831 835 832 return rc; … … 857 854 AssertReleaseRC(rc); 858 855 859 #if 0860 /* If the input queue is not empty, restart the timer. */861 #else862 856 /* If more movement is accumulated, report it and restart the timer. */ 863 857 uHaveEvents = ps2mHaveEvents(pThis); … … 865 859 866 860 if (uHaveEvents) 867 #endif868 861 { 869 862 /* Report accumulated data, poke the KBC, and start the timer. */ … … 878 871 } 879 872 880 /* The auxiliary device is specified to take up to about 500 milliseconds. We need873 /* The auxiliary device reset is specified to take up to about 500 milliseconds. We need 881 874 * to delay sending the result to the host for at least a tiny little while. 882 875 */ … … 968 961 pThis->fCurrB = fButtons; 969 962 970 #if 1971 963 /* Report the event and start the throttle timer unless it's already running. */ 972 964 if (!pThis->fThrottleActive) … … 977 969 TMTimerSetMillies(pThis->CTX_SUFF(pThrottleTimer), pThis->uThrottleDelay); 978 970 } 979 #else980 /* Clamp the delta values to the allowed range. */981 dx = RT_MIN(RT_MAX(dx, -256), 255);982 dy = RT_MIN(RT_MAX(dy, -256), 255);983 984 /* Start with the sync bit. */985 val = RT_BIT(3);986 /* Add buttons 1-3. */987 val |= fButtons & PS2M_STD_BTN_MASK;988 /* Set the X/Y sign bits. */989 if (dx < 0)990 val |= RT_BIT(4);991 if (dy < 0)992 val |= RT_BIT(5);993 994 ps2kInsertQueue((GeneriQ *)&pThis->evtQ, val);995 ps2kInsertQueue((GeneriQ *)&pThis->evtQ, (uint8_t)dx);996 ps2kInsertQueue((GeneriQ *)&pThis->evtQ, (uint8_t)dy);997 if (pThis->enmProtocol > PS2M_PROTO_PS2STD)998 {999 ps2kInsertQueue((GeneriQ *)&pThis->evtQ, (uint8_t)dz);1000 }1001 #endif1002 971 1003 972 return rc; … … 1179 1148 ps2kClearQueue((GeneriQ *)&pThis->cmdQ); 1180 1149 ps2mSetDefaults(pThis); /* Also clears event queue. */ 1181 1182 /* Activate the PS/2 mouse by default. */1183 // if (pThis->Mouse.pDrv)1184 // pThis->Mouse.pDrv->pfnSetActive(pThis->Mouse.pDrv, true);1185 1150 } 1186 1151
Note:
See TracChangeset
for help on using the changeset viewer.