Changeset 48586 in vbox
- Timestamp:
- Sep 20, 2013 1:13:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
r48575 r48586 22 22 *******************************************************************************/ 23 23 #define LOG_GROUP LOG_GROUP_GUI 24 //#define DARWIN_KBD_LEDS_SYNC 25 24 26 #include "DarwinKeyboard.h" 25 27 #include <iprt/assert.h> … … 288 290 #endif /* USE_HID_FOR_MODIFIERS */ 289 291 292 #ifdef DARWIN_KBD_LEDS_SYNC 290 293 /* HID LEDs synchronization data: LED states. */ 291 294 typedef struct VBoxHidLeds_t { … … 302 305 CFIndex cDevices; 303 306 } VBoxHidsState_t; 304 307 #endif /* DARWIN_KBD_LEDS_SYNC */ 305 308 306 309 /******************************************************************************* … … 1148 1151 } 1149 1152 1153 #ifdef DARWIN_KBD_LEDS_SYNC 1150 1154 /** Prepare dictionary that will be used to match HID LED device(s) while discovering. */ 1151 1155 static CFDictionaryRef darwinGetLedDeviceMatchingDictionary() … … 1354 1358 return rc2; 1355 1359 } 1360 #endif /* DARWIN_KBD_LEDS_SYNC */ 1356 1361 1357 1362 /** Save the states of leds for all HID devices attached to the system and return it. */ 1358 1363 void * DarwinHidDevicesKeepLedsState(void) 1359 1364 { 1365 #ifdef DARWIN_KBD_LEDS_SYNC 1360 1366 IOReturn rc; 1361 1367 VBoxHidsState_t *hidsState; … … 1444 1450 1445 1451 return NULL; 1452 #else /* DARWIN_KBD_LEDS_SYNC */ 1453 return NULL; 1454 #endif 1446 1455 } 1447 1456 … … 1455 1464 int DarwinHidDevicesApplyAndReleaseLedsState(void *pState) 1456 1465 { 1466 #ifdef DARWIN_KBD_LEDS_SYNC 1457 1467 VBoxHidsState_t *hidsState = (VBoxHidsState_t *)pState; 1458 1468 … … 1496 1506 1497 1507 return rc2; 1508 #else /* DARWIN_KBD_LEDS_SYNC */ 1509 (void)pState; 1510 return 0; 1511 #endif 1498 1512 } 1499 1513 … … 1510 1524 void DarwinHidDevicesBroadcastLeds(bool fNumLockOn, bool fCapsLockOn, bool fScrollLockOn) 1511 1525 { 1526 /* Temporary disabled */ 1527 #ifdef DARWIN_KBD_LEDS_SYNC 1512 1528 IOReturn rc; 1513 1529 IOHIDManagerRef hidManagerRef; … … 1567 1583 CFRelease(hidManagerRef); 1568 1584 } 1569 } 1585 #else /* DARWIN_KBD_LEDS_SYNC */ 1586 (void)fNumLockOn; 1587 (void)fCapsLockOn; 1588 (void)fScrollLockOn; 1589 #endif 1590 }
Note:
See TracChangeset
for help on using the changeset viewer.