VirtualBox

Changeset 89831 in vbox


Ignore:
Timestamp:
Jun 22, 2021 1:09:19 PM (4 years ago)
Author:
vboxsync
Message:

DrvMouseQueue,DrvKeyboardQueue: Don't keep items in the queue unless VERR_TRY_AGAIN is returns, as per documentation.

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

Legend:

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

    r82968 r89831  
    353353    PDRVKBDQUEUEITEM    pItem = (PDRVKBDQUEUEITEM)pItemCore;
    354354    int rc = pThis->pUpPort->pfnPutEventHid(pThis->pUpPort, pItem->idUsage);
    355     return RT_SUCCESS(rc);
     355    return rc != VERR_TRY_AGAIN;
    356356}
    357357
     
    508508    }
    509509
    510     rc = PDMDrvHlpQueueCreate(pDrvIns, sizeof(DRVKBDQUEUEITEM), cItems, cMilliesInterval, drvKbdQueueConsumer, "Keyboard", &pDrv->pQueue);
     510    rc = PDMDrvHlpQueueCreate(pDrvIns, sizeof(DRVKBDQUEUEITEM), cItems, cMilliesInterval,
     511                              drvKbdQueueConsumer, "Keyboard", &pDrv->pQueue);
    511512    if (RT_FAILURE(rc))
    512513    {
  • trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp

    r82968 r89831  
    249249                                            pItem->u.Absolute.fButtons);
    250250    else
    251         return false;
    252     return RT_SUCCESS(rc);
     251        AssertMsgFailedReturn(("enmType=%d\n"), true /* remove buggy data */);
     252    return rc != VERR_TRY_AGAIN;
    253253}
    254254
     
    402402    }
    403403
    404     rc = PDMDrvHlpQueueCreate(pDrvIns, sizeof(DRVMOUSEQUEUEITEM), cItems, cMilliesInterval, drvMouseQueueConsumer, "Mouse", &pDrv->pQueue);
     404    rc = PDMDrvHlpQueueCreate(pDrvIns, sizeof(DRVMOUSEQUEUEITEM), cItems, cMilliesInterval,
     405                              drvMouseQueueConsumer, "Mouse", &pDrv->pQueue);
    405406    if (RT_FAILURE(rc))
    406407    {
Note: See TracChangeset for help on using the changeset viewer.

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