dinput: joydevs[id].name (EVIOCGNAME) is product name, joydevs[id].device is a path

Ben Klein shacklein at gmail.com
Tue Feb 10 01:54:59 CST 2009

2009/2/10 Vincent Pelletier <plr.vincent at gmail.com>:
> On Tue, Feb 10, 2009 at 1:00 AM, Ben Klein <shacklein at gmail.com> wrote:
>> You're adding a new field to the JoyDev struct called instance_name,
>> which if I read right will store the input device path, but what
>> happens to the existing device field? It looks like it's just taking
>> up space, not actually getting a value stored in it.
> There is a value stored in it: see the code just above the second
> chunk in my patch.

You're taking out the strcpy into device, and replacing it with a
strcpy into instance_name. What value will the device field hold?

> But maybe you mean that it might not be read any more... Which might
> be the case, I didn't check.
> About using space, I was more "worried" about the duplication of data
> between "name" (kernel-provided device string - not a path) and the
> new "instance_name" (could not find a better name for that without
> changing existing) which also contains the device string plus
> "evdev%d" as Vitaliy proposed.

When will the new "instance_name" field be accessed by Wine? Regarding
Vitaliy's earlier post, it looks ike "name" (product name) and
"instance_name" are the same on native Windows platform. If this is
always true, returning "name" when asked for instance name would be
valid (so, storing only one string). A counter-example of this would
be useful.

The other difference is that the evdev method returns the vendor as a
part of the product name (hence "Logitech Logitech MOMO Racing" etc.)
Should we be concerned about this?

More information about the wine-devel mailing list