dinput: Alter function name and code style.

Signed-off-by: David Lawrie <david.dljunk@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
David Lawrie 2016-07-11 04:06:02 -07:00 committed by Alexandre Julliard
parent 33c43473c0
commit c543c603a5
1 changed files with 8 additions and 7 deletions

View File

@ -198,10 +198,9 @@ static long get_device_location_ID(IOHIDDeviceRef device)
return get_device_property_long(device, CFSTR(kIOHIDLocationIDKey));
}
static void CFSetApplierFunctionCopyToCFArray(const void *value, void *context)
static void copy_set_to_array(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)
@ -486,10 +485,12 @@ static int find_osx_devices(void)
if (devset)
{
CFIndex num_devices, num_main_elements, idx;
CFMutableArrayRef devices = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
CFSetApplyFunction(devset, CFSetApplierFunctionCopyToCFArray, devices);
CFRelease( devset);
num_devices = CFArrayGetCount(devices);
CFMutableArrayRef devices;
num_devices = CFSetGetCount(devset);
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);
device_main_elements = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);