Commit c543c603 authored by David Lawrie's avatar David Lawrie Committed by Alexandre Julliard

dinput: Alter function name and code style.

parent 33c43473
...@@ -198,10 +198,9 @@ static long get_device_location_ID(IOHIDDeviceRef device) ...@@ -198,10 +198,9 @@ static long get_device_location_ID(IOHIDDeviceRef device)
return get_device_property_long(device, CFSTR(kIOHIDLocationIDKey)); return get_device_property_long(device, CFSTR(kIOHIDLocationIDKey));
} }
static void copy_set_to_array(const void *value, void *context)
static void CFSetApplierFunctionCopyToCFArray(const void *value, void *context)
{ {
CFArrayAppendValue( ( CFMutableArrayRef ) context, value ); CFArrayAppendValue(context, value);
} }
static CFComparisonResult device_location_comparator(const void *val1, const void *val2, void *context) static CFComparisonResult device_location_comparator(const void *val1, const void *val2, void *context)
...@@ -486,10 +485,12 @@ static int find_osx_devices(void) ...@@ -486,10 +485,12 @@ static int find_osx_devices(void)
if (devset) if (devset)
{ {
CFIndex num_devices, num_main_elements, idx; CFIndex num_devices, num_main_elements, idx;
CFMutableArrayRef devices = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); CFMutableArrayRef devices;
CFSetApplyFunction(devset, CFSetApplierFunctionCopyToCFArray, devices);
CFRelease( devset); num_devices = CFSetGetCount(devset);
num_devices = CFArrayGetCount(devices); devices = CFArrayCreateMutable(kCFAllocatorDefault, num_devices, &kCFTypeArrayCallBacks);
CFSetApplyFunction(devset, copy_set_to_array, devices);
CFRelease(devset);
CFArraySortValues(devices, CFRangeMake(0, num_devices), device_location_comparator, NULL); CFArraySortValues(devices, CFRangeMake(0, num_devices), device_location_comparator, NULL);
device_main_elements = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); device_main_elements = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment