VirtualBox

Ignore:
Timestamp:
Dec 5, 2013 11:26:00 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91106
Message:

OS X host: HID LEDs sync: move built-in keyboard resume code from VBoxUSB.kext to VBoxDrv.kext.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r49767 r49787  
    6767#include <IOKit/pwr_mgt/RootDomain.h>
    6868#include <IOKit/IODeviceTreeSupport.h>
     69#include <IOKit/usb/IOUSBHIDDriver.h>
    6970
    7071#ifdef VBOX_WITH_HOST_VMX
     
    11431144
    11441145
     1146/**
     1147 * Resume built-in keyboard on MacBook Air and Pro hosts.
     1148 * If there is no built-in keyboard device, return success anyway.
     1149 */
     1150int VBOXCALL    supdrvDarwinResumeBuiltinKbd(void)
     1151{
     1152    /*
     1153     * AppleUSBTCKeyboard KEXT is responsible for built-in keyboard management.
     1154     * We resume keyboard by accessing to its IOService. */
     1155    OSDictionary *pDictionary = IOService::serviceMatching("AppleUSBTCKeyboard");
     1156    if (pDictionary)
     1157    {
     1158        OSIterator     *pIter;
     1159        IOUSBHIDDriver *pDriver;
     1160
     1161        pIter = IOService::getMatchingServices(pDictionary);
     1162        if (pIter)
     1163        {
     1164            while ((pDriver = (IOUSBHIDDriver *)pIter->getNextObject()))
     1165                pDriver->SuspendPort(false, 0);
     1166
     1167            pIter->release();
     1168        }
     1169        pDictionary->release();
     1170    }
     1171
     1172    return 0;
     1173}
     1174
     1175
    11451176
    11461177/**
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