From: Ignaz Forster <ignaz.forster@gmx.de>
To: todd@electronjump.com
Cc: linux-input@vger.kernel.org
Subject: Re: Game Controllers
Date: Sat, 04 May 2013 00:03:22 +0200 [thread overview]
Message-ID: <5184342A.10706@gmx.de> (raw)
In-Reply-To: <CAFmpkyiS+L6OsGmobjHqqJ8AFNNiDk4DYYFo_1GQx2kV_dam1Q@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Todd Showalter schrieb am 30.04.2013 02:46 Uhr:
> What I'd like to request at the evdev level is that things which
> are gamepads export these values in standard offsets, so that:
>
> EV_ABS 0 == left stick x
> EV_ABS 1 == left stick y
> EV_ABS 2 == right stick x
> EV_ABS 3 == right stick y
> EV_ABS 4 == dpad x
> EV_ABS 5 == dpad y
> EV_ABS 6 == left trigger
> EV_ABS 7 == right trigger
>
> Or some similar defined order. I'd like buttons to be similarly mapped:
>
> BTN_START == start button
> BTN_WEST == xbox x, ps square
> BTN_NORTH == xbox y, ps triangle
> BTN_EAST == xbox b, ps circle
> BTN_SOUTH == xbox a, ps x
I don't think this will work as you expect it.
Let's take my own gamepad adapter for example: You can connect PlayStation, Dreamcast and GameCube controllers to it. The Dreamcast controller has the A button on the bottom and the B button on the right side, the GameCube controller has the A button in the middle and the B button on the lower left side:
| A | B | X | Y
- ----------+--------+------------+-------+-----
Dreamcast | bottom | right | left | top
- ----------+--------+------------+-------+-----
GameCube | middle | lower left | right | top
In any case the A button is reported as the first button, the B button as the second one etc.
Now the question is: Which button is BTN_WEST? You cannot tell, as it depends on what controller is connected.
This may be a special case, but there are probably other controllers with "weird" button layouts out there (e.g. 6 button pads, the SNES pad, ...); moreover you don't have the guaranty that every gamepad has all the buttons you expect.
To make it usable "out of the box" you would have to limit the interface to gamepads with a certain layout, but this will probably break if any of the major manufacturers decides to develop a new gamepad layout. Those "features specific to a gamepad" you are mentioning in another mail are probably everything that a gamepad has, as you can never be sure about it's layout ;-)
While I totally agree that the situation is not ideal there is probably nothing to do about it. Using a default layout which fits for most controllers (these days probably the Xbox 360 controller layout) and offering some kind of ingame mapping to adjust it for non-standard controllers should be the way to go. You will have to offer an ingame remapping option anyway if you don't want to force your users to use your button mapping even if they may prefer another one.
Ignaz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/
iEYEARECAAYFAlGENCoACgkQ/2+SjQTlQJnbVwCfVVGZcuESUNv9V+UDcLikGJtC
RUYAmwcYvb7Ngjo0fSNkrhXoeA4hXKWj
=dH7P
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-05-03 22:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 0:13 Game Controllers Todd Showalter
2013-04-29 21:04 ` Dmitry Torokhov
2013-04-30 0:46 ` Todd Showalter
2013-05-02 6:35 ` Antonio Ospite
2013-05-02 13:46 ` Todd Showalter
2013-05-02 14:09 ` David Herrmann
2013-05-02 15:37 ` Todd Showalter
2013-05-02 16:55 ` Dmitry Torokhov
2013-05-02 15:58 ` Todd Showalter
2013-05-02 16:38 ` Dmitry Torokhov
2013-05-02 17:06 ` Todd Showalter
2013-05-02 18:29 ` Dmitry Torokhov
2013-05-02 19:54 ` Todd Showalter
2013-05-02 20:18 ` Dmitry Torokhov
2013-05-02 20:30 ` Todd Showalter
2013-05-02 20:49 ` Dmitry Torokhov
2013-05-02 17:01 ` Dmitry Torokhov
2013-05-02 17:35 ` Todd Showalter
2013-05-02 17:54 ` David Herrmann
2013-05-02 19:10 ` Todd Showalter
2013-05-02 20:45 ` Dmitry Torokhov
2013-05-02 21:10 ` Todd Showalter
2013-05-03 15:50 ` Dmitry Torokhov
2013-09-07 17:01 ` Bastien Nocera
2013-05-03 10:29 ` Simon Farnsworth
2013-05-03 12:57 ` Todd Showalter
2013-05-03 16:01 ` Dmitry Torokhov
2013-05-03 17:12 ` Todd Showalter
2013-05-03 22:03 ` Ignaz Forster [this message]
2013-05-04 13:48 ` Todd Showalter
2013-05-02 3:25 ` Ray Dillinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5184342A.10706@gmx.de \
--to=ignaz.forster@gmx.de \
--cc=linux-input@vger.kernel.org \
--cc=todd@electronjump.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).