* [PATCH] gamecon.c: Fix for SNES controllers
@ 2001-07-06 1:49 Michael Gold
2001-07-07 16:46 ` Vojtech Pavlik
0 siblings, 1 reply; 2+ messages in thread
From: Michael Gold @ 2001-07-06 1:49 UTC (permalink / raw)
To: vojtech; +Cc: linux-joystick, linux-kernel
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] gamecon.c: Fix for SNES controllers
2001-07-06 1:49 [PATCH] gamecon.c: Fix for SNES controllers Michael Gold
@ 2001-07-07 16:46 ` Vojtech Pavlik
0 siblings, 0 replies; 2+ messages in thread
From: Vojtech Pavlik @ 2001-07-07 16:46 UTC (permalink / raw)
To: Michael Gold; +Cc: linux-joystick, linux-kernel
On Thu, Jul 05, 2001 at 09:49:08PM -0400, Michael Gold wrote:
> 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])
>
Already fixed in -ac series kernels. Thanks anyway.
--
Vojtech Pavlik
SuSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-07 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-06 1:49 [PATCH] gamecon.c: Fix for SNES controllers Michael Gold
2001-07-07 16:46 ` Vojtech Pavlik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox