Commit graph

119 commits

Author SHA1 Message Date
Sam Lantinga
33f5989f5a Fixed to match the docs
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401278
2006-01-27 06:36:33 +00:00
Sam Lantinga
31f22de807 Backing out new changes, at Chris Nelson's request.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40954
2004-09-11 17:48:41 +00:00
Sam Lantinga
a69bbd4764 Date: Wed, 23 Jun 2004 17:05:33 -0400
From: Chris Nelson
Subject: [SDL] [Patch] WiseGroup MP-8800 / MP-8866 (PS2 Joystick)

In the current cvs version, SDL doesn't handle these Playstation2
controller => USB adapters correctly, in linux.

It will always assume that the maximum number of joysticks (2 in the
case of the MP-8866, 4 in the case of the 8800) are plugged in. This is
bad not only because it allows SDL to exaggerate the number of logical
joysticks, but primarily because the joystick axes are mapped
incorrectly, all over the place, such that the devices are effectively
unusable unless you have the maximum number of joysticks plugged in.

My changes to src/joystick/linux/SDL_sysjoystick.c build on another's
previous work (which was a special case for this very joystick,
actually), and fix both of these problems, as well as making the current
code a little more general, to allow for others to more easily drop in
code for quirky joysticks such as these.

I've tested this code under 2.6.7 as well as 2.4.24... Both work as
advertised (provided you load the JOYDEV linux code as a module,
otherwise they won't work at all, new code or old, but that's another
issue entirely).

Though this sounds horribly formal, you have my permission to distribute
all of my work on this issue under the LGPL. So there.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40915
2004-07-25 18:31:50 +00:00
Sam Lantinga
77e3c78bf3 Date: Tue, 16 Mar 2004 12:40:33 +0000
From: Alan Swanson
Subject: [SDL] [PATCH] Linux joystick evdev axis count fix

The event device configuration under Linux does not check the returned
ioctl value when reading the axis information. This means extra
undefined axes are returned.

Note, in EV_HandleEvents, the default for case EV_ABS is to return any
axis information which is fine as we have already checked for all valid
absolute axes. No new axes should be returned after opening the device.

(Unless, of course, the evdev allows closing and reassigning a new
device while in use and I can't believe that happens.)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40897
2004-05-16 22:48:06 +00:00
Sam Lantinga
01baa89827 Date: Sun, 18 Apr 2004 16:09:53 -0400 (EDT)
From: David MacCormack
Subject: [SDL] Linux joystick patch

I recently got myself a PS2 -> USB converter (a super joybox 5).  It
accepts 4 PSX/PS2 controllers.  It's implemented as a HID, which is nice
because it doesn't require its own driver, but the problem is that it's
implemented as a *single* HID -- that is, it shows up as a single
joystick with 19 axes, 4 hats, and 48 buttons.  This poses a problem for a
number of apps which use SDL (stella, fce ultra, zsnes, to name a few) and
see only a single (physical) joystick even though there are really 4
(logical) joysticks.  There are a number of these types of devices on the
market, and I've seen others post messages (in the zsnes forum, for
example) with the same problem, so I came up with what I think is a pretty
generic solution.

I patched src/joystick/linux/SDL_sysjoystic.c to include support for
logical joysticks; basically, it's a static array and supporting functions
that map a single physical joystick to multiple logical joysticks.  The
attached patch has the new code.  It's wrapped inside #ifndef
statements so that you can get the old behavior if you want.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40893
2004-05-16 18:46:24 +00:00
Sam Lantinga
561b81add3 Date: Fri, 05 Mar 2004 16:08:01 +0000
From: Alan Swanson
Subject: Re: [SDL] Fatal signal when initiaize with USB joystick on 2.6.2 kern

On Fri, 2004-03-05 at 15:09, Sam Lantinga wrote:
> > Fred, how does the attached patch work for you? Do all your axes work?
>
> I think you meant the two lines to be reversed.
> I checked a more robust version of this into CVS.  Fred, can you see if
> it works?

You've misread the code. :-/

For coef[0] and coef[1], it is (values[2]+values[1]) / 2 and then add
or subtract values[4] to the answer.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40873
2004-03-06 02:58:06 +00:00
Sam Lantinga
ea8c53b7fe Avoid FPE with Linux 2.6
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40872
2004-03-05 15:09:18 +00:00
Sam Lantinga
cb9c2efd17 Updated copyright information for 2004 (Happy New Year!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40770
2004-01-04 16:49:27 +00:00
Sam Lantinga
94474c2e62 Removed obsolete Linux joystick code
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40590
2003-02-01 20:25:34 +00:00
Sam Lantinga
241cf39101 Linux joystick cleanups from Alan Swanson
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40555
2002-12-02 03:11:36 +00:00
Sam Lantinga
76555d8bed *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40409
2002-06-12 23:49:31 +00:00
Sam Lantinga
7825ae2b6d Added some more joysticks on Linux
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40407
2002-06-12 03:30:58 +00:00
Sam Lantinga
a1b67e349e *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40378
2002-05-20 17:40:55 +00:00
Sam Lantinga
ea5d630479 Updated copyright information for 2002
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40298
2002-03-06 11:23:08 +00:00
Sam Lantinga
3ceea60069 Updated the source with the correct e-mail address
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40253
2001-12-14 12:38:15 +00:00
Sam Lantinga
90a40eae2b *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40246
2001-11-26 22:22:20 +00:00
Sam Lantinga
e79ad74ac3 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40222
2001-11-02 18:12:52 +00:00
Sam Lantinga
75c71e3f4b If we're looking at the /dev/input event devices, and we found
at least one, then we don't want to look at the input joystick
devices, since they're built on top of devices that we've already
seen, so we're done.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40212
2001-10-22 21:34:50 +00:00
Sam Lantinga
2f110628a7 Initial revision
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401
2001-04-26 16:45:43 +00:00