File: fix_joystick_misc_axes.diff

package info (click to toggle)
libsdl1.2 1.2.15%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,596 kB
  • sloc: ansic: 128,539; cpp: 11,192; sh: 9,887; asm: 2,553; objc: 2,128; makefile: 349; csh: 248; perl: 35; pascal: 8
file content (30 lines) | stat: -rw-r--r-- 1,044 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Sam Hocevar <sam@hocevar.net>
Date: Sun, 10 Jul 2022 11:19:25 +0100
Subject: Left/Right Joystick Axis doesn't work with some controllers

Introduced in 1.2.15-3 (June 2012)

Reviewed in 2013-10-19 for SDL2 and SDL1.2 and submitted new upstream bug
report for re-evaluation, the previous one (suggested by the bug submitted) was
probably not related.

Last-Update: 2013-10-19
Bug-Debian: http://bugs.debian.org/673324
Forwarded: https://bugzilla.libsdl.org/show_bug.cgi?id=2165
---
 src/joystick/linux/SDL_sysjoystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index ee43974..80e46e4 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -702,7 +702,7 @@ static SDL_bool EV_ConfigJoystick(SDL_Joystick *joystick, int fd)
 				++joystick->nbuttons;
 			}
 		}
-		for ( i=0; i<ABS_MISC; ++i ) {
+		for ( i=0; i<ABS_MAX; ++i ) {
 			/* Skip hats */
 			if ( i == ABS_HAT0X ) {
 				i = ABS_HAT3Y;