Changeset 55073 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 1, 2015 1:56:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/PS2K.cpp
r54261 r55073 611 611 } 612 612 613 #ifdef IN_RING3 614 /** 615 * Notify listener about LEDs state change. 616 * 617 * @param pThis The PS/2 keyboard instance data. 618 * @param u8State Bitfield which reflects LEDs state. 619 */ 620 static void PS2KNotifyLedsState(PPS2K pThis, uint8_t u8State) 621 { 622 623 PDMKEYBLEDS enmLeds = PDMKEYBLEDS_NONE; 624 625 if (u8State & 0x01) 626 enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_SCROLLLOCK); 627 if (u8State & 0x02) 628 enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_NUMLOCK); 629 if (u8State & 0x04) 630 enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_CAPSLOCK); 631 632 pThis->Keyboard.pDrv->pfnLedStatusChange(pThis->Keyboard.pDrv, enmLeds); 633 634 } 635 #endif /* IN_RING3 */ 636 613 637 /** 614 638 * Receive and process a byte sent by the keyboard controller. … … 696 720 #else 697 721 { 698 PDMKEYBLEDS enmLeds = PDMKEYBLEDS_NONE; 699 700 if (cmd & 0x01) 701 enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_SCROLLLOCK); 702 if (cmd & 0x02) 703 enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_NUMLOCK); 704 if (cmd & 0x04) 705 enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_CAPSLOCK); 706 pThis->Keyboard.pDrv->pfnLedStatusChange(pThis->Keyboard.pDrv, enmLeds); 722 PS2KNotifyLedsState(pThis, cmd); 707 723 pThis->fNumLockOn = !!(cmd & 0x02); /* Sync internal Num Lock state. */ 708 724 ps2kInsertQueue((GeneriQ *)&pThis->cmdQ, KRSP_ACK); … … 1335 1351 */ 1336 1352 ps2kReleaseKeys(pThis); 1353 #ifdef IN_RING3 1354 PS2KNotifyLedsState(pThis, pThis->u8LEDs); 1355 #endif 1337 1356 return VINF_SUCCESS; 1338 1357 }
Note:
See TracChangeset
for help on using the changeset viewer.