Changeset 79675 in vbox
- Timestamp:
- Jul 10, 2019 2:12:14 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
r76553 r79675 206 206 207 207 /** 208 * Queues a keyboard event.208 * Queues a scancode-based keyboard event. 209 209 * Because of the event queueing the EMT context requirement is lifted. 210 210 * … … 262 262 263 263 264 /** 265 * Queues a HID-usage-based keyboard event. 266 * Because of the event queueing the EMT context requirement is lifted. 267 * 268 * @returns VBox status code. 269 * @param pInterface Pointer to this interface structure. 270 * @param u32UsageCode The HID usage code to queue. 271 * @thread Any thread. 272 */ 273 static DECLCALLBACK(int) drvKbdQueuePutEventHid(PPDMIKEYBOARDPORT pInterface, uint32_t u32UsageCode) 274 { 275 PDRVKBDQUEUE pDrv = IKEYBOARDPORT_2_DRVKBDQUEUE(pInterface); 276 /* Ignore any attempt to send events if queue is inactive. */ 277 if (pDrv->fInactive) 278 return VINF_SUCCESS; 279 280 PDRVKBDQUEUEITEM pItem = (PDRVKBDQUEUEITEM)PDMQueueAlloc(pDrv->pQueue); 281 if (pItem) 282 { 283 pItem->u32UsageCode = u32UsageCode; 284 PDMQueueInsert(pDrv->pQueue, &pItem->Core); 285 286 return VINF_SUCCESS; 287 } 288 if (!pDrv->fSuspended) 289 AssertMsgFailed(("drvKbdQueuePutEventHid: Queue is full!!!!\n")); 290 return VERR_PDM_NO_QUEUE_ITEMS; 291 } 292 293 264 294 /* -=-=-=-=- IConnector -=-=-=-=- */ 265 295 … … 425 455 /* IKeyboardPort. */ 426 456 pDrv->IPort.pfnPutEventScan = drvKbdQueuePutEventScan; 457 pDrv->IPort.pfnPutEventHid = drvKbdQueuePutEventHid; 427 458 428 459 /*
Note:
See TracChangeset
for help on using the changeset viewer.

