VirtualBox

Changeset 49811 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 6, 2013 1:31:01 PM (11 years ago)
Author:
vboxsync
Message:

OS X host: HID LEDs sync: prevent LEDs flickering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp

    r49787 r49811  
    12701270    IOReturn      rc = kIOReturnError;
    12711271
    1272     /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */
    1273     int rc1 = SUPR3ResumeBuiltinKeyboard();
    1274     if (RT_FAILURE(rc1))
    1275         return rc1;
    1276 
    12771272    valueRef = IOHIDValueCreateWithIntegerValue(kCFAllocatorDefault, element, 0, (fEnabled) ? 1 : 0);
    12781273    if (valueRef)
     
    12961291    IOReturn      rc;
    12971292    CFIndex       integerValue;
    1298 
    1299     /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */
    1300     int rc1 = SUPR3ResumeBuiltinKeyboard();
    1301     if (RT_FAILURE(rc1))
    1302         return rc1;
    13031293
    13041294    rc = IOHIDDeviceGetValue(hidDevice, element, &valueRef);
     
    13301320    CFArrayRef matchingElementsArrayRef;
    13311321    int        rc2 = 0;
     1322
     1323    /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */
     1324    int rc1 = SUPR3ResumeBuiltinKeyboard();
     1325    if (RT_FAILURE(rc1))
     1326        return rc1;
    13321327
    13331328    matchingElementsArrayRef = IOHIDDeviceCopyMatchingElements(hidDevice, elementMatchingDict, kIOHIDOptionsTypeNone);
     
    13751370    CFArrayRef matchingElementsArrayRef;
    13761371    int        rc2 = 0;
     1372
     1373    /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */
     1374    int rc1 = SUPR3ResumeBuiltinKeyboard();
     1375    if (RT_FAILURE(rc1))
     1376        return rc1;
    13771377
    13781378    matchingElementsArrayRef = IOHIDDeviceCopyMatchingElements(hidDevice, elementMatchingDict, kIOHIDOptionsTypeNone);
     
    17011701                if (elementMatchingDict)
    17021702                {
    1703                     (void)darwinSetDeviceLedsState(pKbd->pDevice, elementMatchingDict, pHidState->guestState.fNumLockOn,
    1704                         pHidState->guestState.fCapsLockOn, pHidState->guestState.fScrollLockOn);
    1705 
     1703                    (void)darwinSetDeviceLedsState(pKbd->pDevice, elementMatchingDict, fNum, fCaps, pHidState->guestState.fScrollLockOn);
    17061704                    CFRelease(elementMatchingDict);
    17071705                }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette