Changeset 49965 in vbox for trunk/src/VBox/HostDrivers/Support/darwin
- Timestamp:
- Dec 17, 2013 8:20:45 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91384
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r49955 r49965 68 68 #include <IOKit/IODeviceTreeSupport.h> 69 69 #include <IOKit/usb/IOUSBHIDDriver.h> 70 #include <IOKit/bluetooth/IOBluetoothHIDDriver.h> 71 #include <IOKit/bluetooth/IOBluetoothHIDDriverTypes.h> 70 72 71 73 #ifdef VBOX_WITH_HOST_VMX … … 1147 1149 #endif /* SUPDRV_WITH_MSR_PROBER */ 1148 1150 1151 /** 1152 * Resume Bluetooth keyboard. 1153 * If there is no Bluetooth keyboard device connected to the system we just ignore this. 1154 */ 1155 static void supdrvDarwinResumeBluetoothKbd(void) 1156 { 1157 OSDictionary *pDictionary = IOService::serviceMatching("AppleBluetoothHIDKeyboard"); 1158 if (pDictionary) 1159 { 1160 OSIterator *pIter; 1161 IOBluetoothHIDDriver *pDriver; 1162 1163 pIter = IOService::getMatchingServices(pDictionary); 1164 if (pIter) 1165 { 1166 while ((pDriver = (IOBluetoothHIDDriver *)pIter->getNextObject())) 1167 if (pDriver->isKeyboard()) 1168 (void)pDriver->hidControl(IOBTHID_CONTROL_EXIT_SUSPEND); 1169 1170 pIter->release(); 1171 } 1172 pDictionary->release(); 1173 } 1174 } 1149 1175 1150 1176 /** 1151 1177 * Resume built-in keyboard on MacBook Air and Pro hosts. 1152 * If there is no built-in keyboard device , return success anyway.1153 */ 1154 int VBOXCALLsupdrvDarwinResumeBuiltinKbd(void)1178 * If there is no built-in keyboard device attached to the system we just ignore this. 1179 */ 1180 static void supdrvDarwinResumeBuiltinKbd(void) 1155 1181 { 1156 1182 /* … … 1174 1200 pDictionary->release(); 1175 1201 } 1202 } 1203 1204 1205 /** 1206 * Resume suspended keyboard devices (if any). 1207 */ 1208 int VBOXCALL supdrvDarwinResumeSuspendedKbds(void) 1209 { 1210 supdrvDarwinResumeBuiltinKbd(); 1211 supdrvDarwinResumeBluetoothKbd(); 1176 1212 1177 1213 return 0; 1178 1214 } 1179 1180 1215 1181 1216
Note:
See TracChangeset
for help on using the changeset viewer.