From: Michael Gold <mgold@scs.carleton.ca>
To: vojtech@suse.cz
Cc: linux-joystick@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
Subject: [PATCH] gamecon.c: Fix for SNES controllers
Date: Thu, 5 Jul 2001 21:49:08 -0400 [thread overview]
Message-ID: <20010705214908.B1943@linux.box> (raw)
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
In kernel 2.4.4, a change was made to gamecon.c that causes problems
with Super Nintendo controllers. The directional pad no longer works
correctly - only the up and left directions work. The following patch
fixes the problem by reversing the change. It applies cleanly to
kernels 2.4.4, 2.4.5, and 2.4.6.
--- linux-2.4.4-orig/drivers/char/joystick/gamecon.c Wed Apr 11 22:02:30 2001
+++ linux-2.4.4/drivers/char/joystick/gamecon.c Sat May 26 03:57:13 2001
@@ -345,8 +345,8 @@
s = gc_status_bit[i];
if (s & (gc->pads[GC_NES] | gc->pads[GC_SNES])) {
- input_report_abs(dev + i, ABS_X, ! - !(s & data[6]) - !(s & data[7]));
- input_report_abs(dev + i, ABS_Y, ! - !(s & data[4]) - !(s & data[5]));
+ input_report_abs(dev + i, ABS_X, !!(s & data[7]) - !!(s & data[6]));
+ input_report_abs(dev + i, ABS_Y, !!(s & data[5]) - !!(s & data[4]));
}
if (s & gc->pads[GC_NES])
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
next reply other threads:[~2001-07-06 1:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-06 1:49 Michael Gold [this message]
2001-07-07 16:46 ` [PATCH] gamecon.c: Fix for SNES controllers Vojtech Pavlik
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=20010705214908.B1943@linux.box \
--to=mgold@scs.carleton.ca \
--cc=linux-joystick@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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