Changeset 89937 in vbox for trunk/src/VBox/Devices/Input
- Timestamp:
- Jun 29, 2021 6:53:59 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145395
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/UsbKbd.cpp
r89935 r89937 462 462 else if (u8HidPage == USB_HID_CC_PAGE) 463 463 { 464 for ( inti = 0; i < RT_ELEMENTS(aHidCCKeys); ++i)464 for (unsigned i = 0; i < RT_ELEMENTS(aHidCCKeys); ++i) 465 465 if (aHidCCKeys[i] == u16HidUsage) 466 466 { … … 472 472 else if (u8HidPage == USB_HID_DC_PAGE) 473 473 { 474 for ( inti = 0; i < RT_ELEMENTS(aHidDCKeys); ++i)474 for (unsigned i = 0; i < RT_ELEMENTS(aHidDCKeys); ++i) 475 475 if (aHidCCKeys[i] == u16HidUsage) 476 476 { … … 499 499 * @param u32HidCode 32-bit USB HID code. 500 500 */ 501 static uint32_t usbInternalCodeToHid( int iKeyCode)501 static uint32_t usbInternalCodeToHid(unsigned uKeyCode) 502 502 { 503 503 uint16_t u16HidUsage; 504 504 uint32_t u32HidCode = 0; 505 505 506 if (( iKeyCode >= USBHID_PAGE_DC_START) && (iKeyCode <= USBHID_PAGE_DC_END))507 { 508 u16HidUsage = aHidDCKeys[ iKeyCode - USBHID_PAGE_DC_START];506 if ((uKeyCode >= USBHID_PAGE_DC_START) && (uKeyCode <= USBHID_PAGE_DC_END)) 507 { 508 u16HidUsage = aHidDCKeys[uKeyCode - USBHID_PAGE_DC_START]; 509 509 u32HidCode = RT_MAKE_U32(u16HidUsage, USB_HID_DC_PAGE); 510 510 } 511 else if (( iKeyCode >= USBHID_PAGE_CC_START) && (iKeyCode <= USBHID_PAGE_CC_END))512 { 513 u16HidUsage = aHidCCKeys[ iKeyCode - USBHID_PAGE_CC_START];511 else if ((uKeyCode >= USBHID_PAGE_CC_START) && (uKeyCode <= USBHID_PAGE_CC_END)) 512 { 513 u16HidUsage = aHidCCKeys[uKeyCode - USBHID_PAGE_CC_START]; 514 514 u32HidCode = RT_MAKE_U32(u16HidUsage, USB_HID_CC_PAGE); 515 515 } 516 516 else /* Must be the keyboard usage page. */ 517 517 { 518 if ( iKeyCode <= VBOX_USB_MAX_USAGE_CODE)519 u32HidCode = RT_MAKE_U32( iKeyCode, USB_HID_KB_PAGE);518 if (uKeyCode <= VBOX_USB_MAX_USAGE_CODE) 519 u32HidCode = RT_MAKE_U32(uKeyCode, USB_HID_KB_PAGE); 520 520 else 521 AssertMsgFailed((" iKeyCode out of range! (%d)\n", iKeyCode));521 AssertMsgFailed(("uKeyCode out of range! (%u)\n", uKeyCode)); 522 522 } 523 523
Note:
See TracChangeset
for help on using the changeset viewer.