Changeset 49955 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Dec 17, 2013 2:49:31 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91368
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
r49935 r49955 1281 1281 IOReturn rc = kIOReturnError; 1282 1282 1283 /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */ 1284 int rc1 = SUPR3ResumeBuiltinKeyboard(); 1285 if (RT_FAILURE(rc1)) 1286 return rc1; 1287 1283 1288 valueRef = IOHIDValueCreateWithIntegerValue(kCFAllocatorDefault, element, 0, (fEnabled) ? 1 : 0); 1284 1289 if (valueRef) … … 1302 1307 IOReturn rc; 1303 1308 CFIndex integerValue; 1309 1310 /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */ 1311 int rc1 = SUPR3ResumeBuiltinKeyboard(); 1312 if (RT_FAILURE(rc1)) 1313 return rc1; 1304 1314 1305 1315 rc = IOHIDDeviceGetValue(hidDevice, element, &valueRef); … … 1332 1342 int rc2 = 0; 1333 1343 1334 /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */1335 int rc1 = SUPR3ResumeBuiltinKeyboard();1336 if (RT_FAILURE(rc1))1337 return rc1;1338 1339 1344 matchingElementsArrayRef = IOHIDDeviceCopyMatchingElements(hidDevice, elementMatchingDict, kIOHIDOptionsTypeNone); 1340 1345 if (matchingElementsArrayRef) … … 1382 1387 int rc2 = 0; 1383 1388 1384 /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */1385 int rc1 = SUPR3ResumeBuiltinKeyboard();1386 if (RT_FAILURE(rc1))1387 return rc1;1388 1389 1389 matchingElementsArrayRef = IOHIDDeviceCopyMatchingElements(hidDevice, elementMatchingDict, kIOHIDOptionsTypeNone); 1390 1390 if (matchingElementsArrayRef) … … 1849 1849 VBoxKbdState_t *pKbd = (VBoxKbdState_t *)CFArrayGetValueAtIndex(pHidState->pDeviceCollection, i); 1850 1850 if (pKbd && pKbd->idLocation == idLocation) 1851 { 1852 LogRel2(("Lookup USB HID Device by location ID 0x%X: found match\n", idLocation)); 1851 1853 return pKbd; 1852 } 1854 } 1855 } 1856 1857 LogRel2(("Lookup USB HID Device by location ID 0x%X: no matches found:\n", idLocation)); 1853 1858 1854 1859 return NULL; … … 1883 1888 VBoxKbdState_t *pKbd = darwinUsbHidQueryKbdByLocationId((uint32_t)idLocation, pHidState); 1884 1889 1885 rc = IOServiceAddInterestNotification(pHidState->pNotificationPrortRef, service, kIOGeneralInterest, 1886 darwinUsbHidGeneralInterestCb, pKbd, &pHidState->pUsbHidGeneralInterestNotify); 1887 1888 AssertMsg(rc == 0, ("Failed to add general interest notification")); 1889 1890 LogRel2(("Found HID device at location 0x%X: class 0x%X, subclass 0x%X\n", idLocation, idDeviceClass, idDeviceSubClass)); 1890 if (pKbd) 1891 { 1892 rc = IOServiceAddInterestNotification(pHidState->pNotificationPrortRef, service, kIOGeneralInterest, 1893 darwinUsbHidGeneralInterestCb, pKbd, &pHidState->pUsbHidGeneralInterestNotify); 1894 1895 AssertMsg(rc == 0, ("Failed to add general interest notification")); 1896 1897 LogRel2(("Found HID device at location 0x%X: class 0x%X, subclass 0x%X\n", idLocation, idDeviceClass, idDeviceSubClass)); 1898 } 1891 1899 } 1892 1900
Note:
See TracChangeset
for help on using the changeset viewer.