diff options
| author | Dominik Pich | 2013-03-17 14:30:05 +0100 | 
|---|---|---|
| committer | Dominik Pich | 2013-03-17 14:30:05 +0100 | 
| commit | f0fd761bbf899e801143f39ce2fd0afd0c559f56 (patch) | |
| tree | 04ec91219487a68d1ba0ec0289c833bf11812e5a | |
| parent | d4ffd217288cfc0d2798b3df67ab20bc867a7f7e (diff) | |
| download | DDHidLib-f0fd761bbf899e801143f39ce2fd0afd0c559f56.tar.bz2 | |
define for APPLE_MIC_ONLY added
| -rw-r--r-- | lib/DDHidAppleMikey.m | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/lib/DDHidAppleMikey.m b/lib/DDHidAppleMikey.m index b0da05f..d56db23 100644 --- a/lib/DDHidAppleMikey.m +++ b/lib/DDHidAppleMikey.m @@ -29,6 +29,8 @@  #import "DDHidEvent.h"  #include <IOKit/hid/IOHIDUsageTables.h> +#define APPLE_MIC_ONLY 1 +  @interface DDHidAppleMikey (DDHidAppleMikeyDelegate)  - (void) ddhidAppleMikey: (DDHidAppleMikey *) mikey @@ -48,14 +50,12 @@  + (NSArray *) allMikeys;  { -    //add mikey -    CFMutableDictionaryRef hidMatchDictionary = -    IOServiceMatching(kIOHIDDeviceKey); -    id a2 = [self allDevicesMatchingCFDictionary: hidMatchDictionary -                                      withClass: self -                              skipZeroLocations: NO]; +    //add mikeys +    id a2 = [self allDevicesMatchingUsagePage:12 usageId:1 withClass:self skipZeroLocations:NO]; +#if APPLE_MIC_ONLY      a2 = [a2 filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"productName == \"Apple Mikey HID Driver\""]]; - +#endif +          return a2;  } | 
