VirtualBox

Changeset 49361 in vbox for trunk


Ignore:
Timestamp:
Nov 1, 2013 12:24:51 PM (11 years ago)
Author:
vboxsync
Message:

OS X host: LEDs sync: LogRel() -> LogRel2().

File:
1 edited

Legend:

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

    r49352 r49361  
    12761276        rc = IOHIDDeviceSetValue(hidDevice, element, valueRef);
    12771277        if (rc != kIOReturnSuccess)
    1278             LogRel(("Warning! Something went wrong in attempt to turn %s HID device led (error %d)!\n", ((fEnabled) ? "on" : "off"), rc));
     1278            LogRel2(("Warning! Something went wrong in attempt to turn %s HID device led (error %d)!\n", ((fEnabled) ? "on" : "off"), rc));
    12791279        else
    1280             LogRel(("Led (%d) is turned %s\n", (int)IOHIDElementGetUsage(element), ((fEnabled) ? "on" : "off")));
     1280            LogRel2(("Led (%d) is turned %s\n", (int)IOHIDElementGetUsage(element), ((fEnabled) ? "on" : "off")));
    12811281
    12821282        CFRelease(valueRef);
     
    13511351            if (rc != 0)
    13521352            {
    1353                 LogRel(("Failed to set led (%d) state\n", (int)IOHIDElementGetUsage(element)));
     1353                LogRel2(("Failed to set led (%d) state\n", (int)IOHIDElementGetUsage(element)));
    13541354                rc2 = kIOReturnError;
    13551355            }
     
    13981398            if (rc != 0)
    13991399            {
    1400                 LogRel(("Failed to get led (%d) state\n", (int)IOHIDElementGetUsage(element)));
     1400                LogRel2(("Failed to get led (%d) state\n", (int)IOHIDElementGetUsage(element)));
    14011401                rc2 = kIOReturnError;
    14021402            }
     
    14651465    }
    14661466
    1467     LogRel(("HID device [VendorID=0x%X, ProductId=0x%X] %s in the list of supported devices.\n", vendorId, productId, (fSupported ? "is" : "is not")));
     1467    LogRel2(("HID device [VendorID=0x%X, ProductId=0x%X] %s in the list of supported devices.\n", vendorId, productId, (fSupported ? "is" : "is not")));
    14681468
    14691469    return fSupported;
     
    15341534                    if (fKeyDown)
    15351535                    {
    1536                         LogRel(("IOHID: KBD %d: Modifier Key-Down\n", (int)pKbd->idxPosition));
     1536                        LogRel2(("IOHID: KBD %d: Modifier Key-Down\n", (int)pKbd->idxPosition));
    15371537
    15381538                        pEvent->pKbd = pKbd;
     
    15501550                            free(pEvent);
    15511551                            CFArrayRemoveValueAtIndex(pHidState->pFifoEventQueue, iQueue);
    1552                             LogRel(("IOHID: KBD %d: Modifier Key-Up (Key-Down %llu ms ago). Apple keyboard, removed from queue\n", (int)pKbd->idxPosition, tsDiff));
     1552                            LogRel2(("IOHID: KBD %d: Modifier Key-Up (Key-Down %llu ms ago). Apple keyboard, removed from queue\n", (int)pKbd->idxPosition, tsDiff));
    15531553                        }
    15541554                        else
    1555                             LogRel(("IOHID: KBD %d: Modifier Key-Up (Key-Down %llu ms ago)\n", (int)pKbd->idxPosition, tsDiff));
     1555                            LogRel2(("IOHID: KBD %d: Modifier Key-Up (Key-Down %llu ms ago)\n", (int)pKbd->idxPosition, tsDiff));
    15561556                    }
    15571557                }
     
    15591559                {
    15601560                    if (fKeyDown)
    1561                         LogRel(("IOHID: unable to find memory to queue KBD %d event\n", (int)pKbd->idxPosition));
     1561                        LogRel2(("IOHID: unable to find memory to queue KBD %d event\n", (int)pKbd->idxPosition));
    15621562                    else
    1563                         LogRel(("IOHID: unable to find KBD %d event in queue\n", (int)pKbd->idxPosition));
     1563                        LogRel2(("IOHID: unable to find KBD %d event in queue\n", (int)pKbd->idxPosition));
    15641564                }
    15651565
     
    15671567            }
    15681568            else
    1569                 LogRel(("IOHID: No KBD: A modifier key has been pressed\n"));
     1569                LogRel2(("IOHID: No KBD: A modifier key has been pressed\n"));
    15701570        }
    15711571}
     
    16071607                /* Found one. Keep its index in queue in order to remove it later. */
    16081608                iEvent = i;
    1609                 LogRel(("CARBON: Found event in queue: %d (KBD %d, tsKeyDown=%llu, pressed %llu ms ago)\n", (int)i, (int)pEvent->pKbd->idxPosition, pEvent->tsKeyDown, RTTimeSystemMilliTS() - pEvent->tsKeyDown));
     1609                LogRel2(("CARBON: Found event in queue: %d (KBD %d, tsKeyDown=%llu, pressed %llu ms ago)\n", (int)i, (int)pEvent->pKbd->idxPosition, pEvent->tsKeyDown, RTTimeSystemMilliTS() - pEvent->tsKeyDown));
    16101610                break;
    16111611            }
    16121612            else
    1613                 LogRel(("CARBON: skip CAPS LOCK event %d (KBD %d) (tsKeyDown=%llu, pressed %llu ms ago)\n", (int)i, (int)pEvent->pKbd->idxPosition, pEvent->tsKeyDown, RTTimeSystemMilliTS() - pEvent->tsKeyDown));
     1613                LogRel2(("CARBON: skip CAPS LOCK event %d (KBD %d) (tsKeyDown=%llu, pressed %llu ms ago)\n", (int)i, (int)pEvent->pKbd->idxPosition, pEvent->tsKeyDown, RTTimeSystemMilliTS() - pEvent->tsKeyDown));
    16141614
    16151615            pEvent = NULL;
     
    16201620            VBoxKbdState_t *pKbd = pEvent->pKbd;
    16211621
    1622             LogRel(("CARBON: KBD %d: caps=%s, num=%s. tsKeyDown=%llu, tsKeyUp=%llu [tsDiff=%llu ms]. %d events in queue.\n",
     1622            LogRel2(("CARBON: KBD %d: caps=%s, num=%s. tsKeyDown=%llu, tsKeyUp=%llu [tsDiff=%llu ms]. %d events in queue.\n",
    16231623                (int)pKbd->idxPosition, VBOX_BOOL_TO_STR_STATE(fCaps), VBOX_BOOL_TO_STR_STATE(fNum),
    16241624                pEvent->tsKeyDown, pEvent->tsKeyUp, pEvent->tsKeyUp - pEvent->tsKeyDown,
     
    16461646        }
    16471647        else
    1648             LogRel(("CARBON: No KBD to take care when modifier key has been pressed: caps=%s, num=%s\n", VBOX_BOOL_TO_STR_STATE(fCaps), VBOX_BOOL_TO_STR_STATE(fNum)));
     1648            LogRel2(("CARBON: No KBD to take care when modifier key has been pressed: caps=%s, num=%s\n", VBOX_BOOL_TO_STR_STATE(fCaps), VBOX_BOOL_TO_STR_STATE(fNum)));
    16491649    }
    16501650
     
    16651665    AssertReturnVoid(pHidState->pDeviceCollection);
    16661666
    1667     LogRel(("Forget KBD %d\n", (int)pKbd->idxPosition));
     1667    LogRel2(("Forget KBD %d\n", (int)pKbd->idxPosition));
    16681668
    16691669    //if (RT_FAILURE(RTSemMutexRequest(pHidState->fifoEventQueueLock, RT_INDEFINITE_WAIT)))
     
    17271727                    if (rc != 0)
    17281728                    {
    1729                         LogRel(("Unable to get leds state for device %d. Mark leds as turned off\n", (int)(pKbd->idxPosition)));
     1729                        LogRel2(("Unable to get leds state for device %d. Mark leds as turned off\n", (int)(pKbd->idxPosition)));
    17301730                        pKbd->LED.fNumLockOn    =
    17311731                        pKbd->LED.fCapsLockOn   =
     
    17421742                    CFArrayAppendValue(pHidState->pDeviceCollection, (void *)pKbd);
    17431743
    1744                     LogRel(("Saved LEDs for KBD %d (%p): fNumLockOn=%s, fCapsLockOn=%s, fScrollLockOn=%s\n",
     1744                    LogRel2(("Saved LEDs for KBD %d (%p): fNumLockOn=%s, fCapsLockOn=%s, fScrollLockOn=%s\n",
    17451745                         (int)pKbd->idxPosition, pKbd, VBOX_BOOL_TO_STR_STATE(pKbd->LED.fNumLockOn), VBOX_BOOL_TO_STR_STATE(pKbd->LED.fCapsLockOn),
    17461746                         VBOX_BOOL_TO_STR_STATE(pKbd->LED.fScrollLockOn)));
     
    17501750                                                      pHidState->guestState.fCapsLockOn, pHidState->guestState.fScrollLockOn);
    17511751                        if (rc != 0)
    1752                             LogRel(("Unable to apply guest state to newly attached device\n"));
     1752                            LogRel2(("Unable to apply guest state to newly attached device\n"));
    17531753                    }
    17541754
     
    17931793    if (RT_FAILURE(RTSemMutexCreate(&pHidState->fifoEventQueueLock)))
    17941794    {
    1795         LogRel(("Unable to create Lock for FIFO event queue\n"));
     1795        LogRel2(("Unable to create Lock for FIFO event queue\n"));
    17961796        CFRelease(pHidState->pFifoEventQueue);
    17971797        pHidState->pFifoEventQueue = NULL;
     
    18151815        }
    18161816        else
    1817             LogRel(("Unable to create a loop source\n"));
     1817            LogRel2(("Unable to create a loop source\n"));
    18181818
    18191819        CFRelease(pTapRef);
    18201820    }
    18211821    else
    1822         LogRel(("Unable to create an event tap\n"));
     1822        LogRel2(("Unable to create an event tap\n"));
    18231823
    18241824    return kIOReturnError;
     
    19081908                rc = IOHIDManagerClose(pHidState->hidManagerRef, 0);
    19091909                if (rc != kIOReturnSuccess)
    1910                     LogRel(("Warning! Something went wrong in attempt to close HID device manager!\n"));
     1910                    LogRel2(("Warning! Something went wrong in attempt to close HID device manager!\n"));
    19111911            }
    19121912
     
    19621962                if (rc != 0)
    19631963                {
    1964                     LogRel(("Unable to restore led states for device (%d)!\n", (int)i));
     1964                    LogRel2(("Unable to restore led states for device (%d)!\n", (int)i));
    19651965                    rc2 = kIOReturnError;
    19661966                }
     
    19681968                IOHIDDeviceUnscheduleFromRunLoop(pKbd->pDevice, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
    19691969
    1970                 LogRel(("Restored LEDs for KBD %d (%p): fNumLockOn=%s, fCapsLockOn=%s, fScrollLockOn=%s\n",
     1970                LogRel2(("Restored LEDs for KBD %d (%p): fNumLockOn=%s, fCapsLockOn=%s, fScrollLockOn=%s\n",
    19711971                     (int)i, pKbd, VBOX_BOOL_TO_STR_STATE(pKbd->LED.fNumLockOn), VBOX_BOOL_TO_STR_STATE(pKbd->LED.fCapsLockOn),
    19721972                     VBOX_BOOL_TO_STR_STATE(pKbd->LED.fScrollLockOn)));
     
    19851985    if (rc != kIOReturnSuccess)
    19861986    {
    1987         LogRel(("Warning! Something went wrong in attempt to close HID device manager!\n"));
     1987        LogRel2(("Warning! Something went wrong in attempt to close HID device manager!\n"));
    19881988        rc2 = kIOReturnError;
    19891989    }
     
    20262026    if (elementMatchingDict)
    20272027    {
    2028         LogRel(("Start LEDs broadcast: fNumLockOn=%s, fCapsLockOn=%s, fScrollLockOn=%s\n",
     2028        LogRel2(("Start LEDs broadcast: fNumLockOn=%s, fCapsLockOn=%s, fScrollLockOn=%s\n",
    20292029            VBOX_BOOL_TO_STR_STATE(fNumLockOn), VBOX_BOOL_TO_STR_STATE(fCapsLockOn), VBOX_BOOL_TO_STR_STATE(fScrollLockOn)));
    20302030
     
    20432043                                              fScrollLockOn);
    20442044                if (rc != 0)
    2045                     LogRel(("Unable to restore led states for device (%d)!\n", (int)i));
     2045                    LogRel2(("Unable to restore led states for device (%d)!\n", (int)i));
    20462046            }
    20472047        }
    20482048
    2049         LogRel(("LEDs broadcast completed\n"));
     2049        LogRel2(("LEDs broadcast completed\n"));
    20502050
    20512051        CFRelease(elementMatchingDict);
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