public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ákos Maróy" <darkeye@tyrell.hu>
To: linux-kernel@vger.kernel.org
Subject: patch for using joysticks in 32 bit applications on 64 bit systems
Date: Sat, 22 Dec 2007 14:49:32 +0100	[thread overview]
Message-ID: <476D15EC.8010309@tyrell.hu> (raw)

unfortunately 32 bit apps don't see the joysticks on a 64 bit system.
this prevents one playing X-Plane (http://www.x-plane.com/) or other
32-bit games with joysticks.

this is a known issue, and already raised several times:

http://readlist.com/lists/vger.kernel.org/linux-kernel/28/144411.html

http://www.brettcsmith.org/wiki/wiki.cgi?action=browse&diff=1&id=OzyComputer/Joystick

unfortunately this is still not fixed in the mainline kernel.

it would be nice to have this fixed, so that people can play these games
without having to patch their kernel.

the following patch solves the problem on 2.6.22:


diff -Naur linux-2.6.22-suspend2-r2/fs/compat_ioctl.c
linux-2.6.22-suspend2-r2-joystick/fs/compat_ioctl.c
--- linux-2.6.22-suspend2-r2/fs/compat_ioctl.c  2007-12-22
14:08:14.000000000
+0100
+++ linux-2.6.22-suspend2-r2-joystick/fs/compat_ioctl.c 2007-12-22
14:07:54.000000000 +0100
@@ -10,6 +10,8 @@
  * ioctls.
  */

+#include <linux/joystick.h>
+
 #include <linux/types.h>
 #include <linux/compat.h>
 #include <linux/kernel.h>
@@ -3259,6 +3261,12 @@
 COMPATIBLE_IOCTL(VIDEO_GET_SIZE)
 COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE)

+/* joystick */
+COMPATIBLE_IOCTL(JSIOCGVERSION)
+COMPATIBLE_IOCTL(JSIOCGAXES)
+COMPATIBLE_IOCTL(JSIOCGBUTTONS)
+COMPATIBLE_IOCTL(JSIOCGNAME(0x200)) /* for X-Plane 8.03 */
+
 /* now things that need handlers */
 HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
 HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)


                 reply	other threads:[~2007-12-22 13:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=476D15EC.8010309@tyrell.hu \
    --to=darkeye@tyrell.hu \
    --cc=linux-kernel@vger.kernel.org \
    /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