[dinput-0/6] multiple devices - Resend #2
Christoph Frick
frick at sc-networks.de
Wed Jul 5 07:27:21 CDT 2006
On Wed, Jul 05, 2006 at 08:00:38AM -0400, Robert Reif wrote:
> The iteration is already done for you in IDirectInputWImpl_EnumDevices
> . You only need to probe for the specified device in
> joydev_enum_deviceW where id is the index of the device being probed
> ("/dev/input/event%d", id). Pass the id to joydev_have(). Look at the
> linux_input code to see how it is done.
i know. but the /dev/input/event nodes are not all joysticks. so i can
not sinply add them and then stop with the first "no-existing" like
joystick_linux does and this can also not be fixed by plug them in a
different order into usb.
e.g. in my case i have the following devs (*=joystick, |=one hardware device)
0* TM Cougar Joystick
1| TM Cougar Fake Keyboard
2| TM Cougar Fake Mouse
3* BRD Speed 7 Pedals + Wheel
4 HH Keyboard
therefore i have changed the EnumDevices logic to the -1/0/1 scheme. but
i can also leave that logic as it is and chane my code, that finds the
joydevs (for now it is a 64-item array, where either this is a joystick
or not) - i can also realloc that list for each joystick i find) and so
make this work in the current 0/1 logic for EnumDevices.
thanks for looking into this - i will refine my patch. the 1-6/6 should
not be applied until new version (i expect no changes for them).
--
cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060705/51bf4b9b/attachment.pgp
More information about the wine-devel
mailing list