Hi!

Ok, I've added it to my copy of joydev.c. I'll send it out as a patch to
the kernel in a while.

Vojtech

On Mon, Jun 26, 2000 at 12:06:29AM -0400, Ray Chason wrote:
> THE DEVICE:
> 
> The Saitek GM2 is a combination mouse and gamepad.  The mouse is equipped with
> two buttons, a scroll wheel, and a hat switch; the gamepad has seven buttons,
> a thumb wheel, and another hat switch.  The mouse plugs into the gamepad,
> which in turn plugs into a USB port.
> 
> THE PROBLEM:
> 
> The existing USB driver shipped with the 2.4.0-test2 kernel recognizes the
> mouse, although it can't seem to distinguish which way the scroll wheel is
> turning; I plan to investigate this matter further.  But the gamepad is not
> seen at all; nor is the hat switch on the mouse.
> 
> It turns out that the gamepad reports itself as a joystick, but the stock
> joystick driver refuses to register it because there is no Y axis.  This
> "joystick" encompasses the thumb wheel (as the X axis), the buttons and hat
> switch on the gamepad, and the hat switch on the mouse.
> 
> THE PATCH:
> 
> To support the Saitek GM2, it is necessary to remove the check for the ABS_Y
> bit in joydev_connect (joydev.c, line 388).
> 
> Original code:
> 
>     if (!(test_bit(EV_KEY, dev->evbit) && test_bit(EV_ABS, dev->evbit) &&
>           test_bit(ABS_X, dev->absbit) && test_bit(ABS_Y, dev->absbit) &&
>          (test_bit(BTN_TRIGGER, dev->keybit) || test_bit(BTN_A, dev->keybit)
>         || test_bit(BTN_1, dev->keybit)))) return NULL;
> 
> Patched code:
> 
>     if (!(test_bit(EV_KEY, dev->evbit) && test_bit(EV_ABS, dev->evbit) &&
>           test_bit(ABS_X, dev->absbit) &&
>          (test_bit(BTN_TRIGGER, dev->keybit) || test_bit(BTN_A, dev->keybit)
>         || test_bit(BTN_1, dev->keybit)))) return NULL;
> 
> Once patched, compiled, and installed, the driver will then recognize the
> gamepad as a USB joystick.
> 
> 
> -- 
>  --------------===============<[ Ray Chason ]>===============--------------
>          PGP public key at http://www.smart.net/~rchason/pubkey.asc
>                             Delenda est Windoze
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Vojtech Pavlik
SuSE Labs

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to