[v1 1/1] dinput: Sort virtual joysticks by name on the Mac
DavidL
david.dljunk at gmail.com
Sun Jul 17 22:20:48 CDT 2016
Right-o! I was wondering what the CFRelease was doing in the debugstr_cf
function. :)
Cheers,
David
On Sun, Jul 17, 2016 at 2:11 PM, Ken Thomases <ken at codeweavers.com> wrote:
> On Jul 17, 2016, at 4:08 PM, Ken Thomases <ken at codeweavers.com> wrote:
> >
> > On Jul 16, 2016, at 3:15 AM, David Lawrie <david.dljunk at gmail.com>
> wrote:
> >>
> >> +static CFStringRef get_device_name(IOHIDDeviceRef device)
> >> +{
> >> + CFTypeRef ref;
> >> + CFStringRef name = CFSTR("Default Name");
> >
> > You can probably do better for a fallback. For example, you can format
> the vendor ID and product ID into a string. For an extreme take on this,
> see the Copy_DeviceName() function in Apple's HID Calibrator sample code:
> >
> https://developer.apple.com/library/mac/samplecode/HID_Calibrator/Listings/HID_Calibrator_IOHIDDeviceWindowCtrl_m.html
>
> Oh, and for the case where device is NULL, it's fine to return NULL. It
> should never happen and, if it does, we want a crash to figure out why and
> fix things in a better manner, rather than papering over it with a bogus
> value.
>
> -Ken
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160717/dac12866/attachment.html>
More information about the wine-devel
mailing list