VirtualBox

Changeset 68109 in vbox for trunk/src


Ignore:
Timestamp:
Jul 25, 2017 3:09:58 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117165
Message:

PS2M: Removed unused code, cleaned up comments.

File:
1 edited

Legend:

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

    r68100 r68109  
    597597
    598598    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));
    600599
    601600    if (pThis->enmMode == AUX_MODE_RESET)
     
    802801    }
    803802    LogFlowFunc(("Active cmd now 0x%02X; updating interrupts\n", pThis->u8CurrCmd));
    804 //    KBCUpdateInterrupts(pThis->pParent);
    805803    return VINF_SUCCESS;
    806804}
    807805
    808806/**
    809  * Send a byte (keystroke or command response) to the keyboard controller.
     807 * Send a byte (packet data or command response) to the keyboard controller.
    810808 *
    811809 * @returns VINF_SUCCESS or VINF_TRY_AGAIN.
     
    821819
    822820    /* 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
    824822     * blocked if a command is currently in progress, even if
    825823     * the command queue is empty.
     
    831829
    832830    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));
    834831
    835832    return rc;
     
    857854    AssertReleaseRC(rc);
    858855
    859 #if 0
    860     /* If the input queue is not empty, restart the timer. */
    861 #else
    862856    /* If more movement is accumulated, report it and restart the timer. */
    863857    uHaveEvents = ps2mHaveEvents(pThis);
     
    865859
    866860    if (uHaveEvents)
    867 #endif
    868861    {
    869862        /* Report accumulated data, poke the KBC, and start the timer. */
     
    878871}
    879872
    880 /* The auxiliary device is specified to take up to about 500 milliseconds. We need
     873/* The auxiliary device reset is specified to take up to about 500 milliseconds. We need
    881874 * to delay sending the result to the host for at least a tiny little while.
    882875 */
     
    968961    pThis->fCurrB   = fButtons;
    969962
    970 #if 1
    971963    /* Report the event and start the throttle timer unless it's already running. */
    972964    if (!pThis->fThrottleActive)
     
    977969        TMTimerSetMillies(pThis->CTX_SUFF(pThrottleTimer), pThis->uThrottleDelay);
    978970    }
    979 #else
    980     /* 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 #endif
    1002971
    1003972    return rc;
     
    11791148    ps2kClearQueue((GeneriQ *)&pThis->cmdQ);
    11801149    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);
    11851150}
    11861151
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