Re: [dinput-0/6] multiple devices - Resend #2
On Wed, Jul 05, 2006 at 06:50:06AM -0400, Robert Reif wrote: > This patch causes the dinput joystick regression test to hang. You > shouldn't need to change any code outside of joystick_linuxinput.*. ok thanks for the hint. i will change the code so the detection of the dinput devices will create a continous list. i will also see, what causes the regression. -- cu pgpIvdqdVtFQs.pgp Description: PGP signature
Re: [dinput-0/6] multiple devices - Resend #2
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 pgpJ3YWYoDhqS.pgp Description: PGP signature
Re: [dinput-0/6] multiple devices - Resend #2
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.
Re: [dinput-0/6] multiple devices - Resend #2
Christoph Frick wrote: On Tue, Jul 04, 2006 at 08:03:06PM -0400, Robert Reif wrote: this is again my patch for handling more than one /dev/input/event* joystick within dinput. there are several other patches now to follow, that expect this patch to be applied. so i label this one 0 of 6. against the previous version it only has some "detect first joystick" code moved around. Why are you changing the code outside of joystick_linuxinput? as explained in my first submit, the code in our dinput's main already has some way to work with multiple devices of one kind i changed the return of the enum-device methods to an int so we have 0=nothing, 1=here is one and -1=nothing here and dont bother any further. i can see no harm in this changes and all the games i tested could not either. This patch causes the dinput joystick regression test to hang. You shouldn't need to change any code outside of joystick_linuxinput.*.
Re: [dinput-0/6] multiple devices - Resend #2
On Tue, Jul 04, 2006 at 08:03:06PM -0400, Robert Reif wrote: > >this is again my patch for handling more than one /dev/input/event* > >joystick within dinput. there are several other patches now to > >follow, that expect this patch to be applied. so i label this one 0 > >of 6. against the previous version it only has some "detect first > >joystick" code moved around. > Why are you changing the code outside of joystick_linuxinput? as explained in my first submit, the code in our dinput's main already has some way to work with multiple devices of one kind i changed the return of the enum-device methods to an int so we have 0=nothing, 1=here is one and -1=nothing here and dont bother any further. i can see no harm in this changes and all the games i tested could not either. -- cu pgptcmGabkh8W.pgp Description: PGP signature
Re: [dinput-0/6] multiple devices - Resend #2
Christoph Frick wrote: hiho this is again my patch for handling more than one /dev/input/event* joystick within dinput. there are several other patches now to follow, that expect this patch to be applied. so i label this one 0 of 6. against the previous version it only has some "detect first joystick" code moved around. License: LGPL ChangeLog: 2006-07-02 Christoph Frick <[EMAIL PROTECTED]> multiple /dev/input/event* joysticks Why are you changing the code outside of joystick_linuxinput?