From f88643fcb404b1f3d71fa4bd9045ab60a1aabf64 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Dec 05 2013 13:12:43 +0000 Subject: Ignore joystick axis events if they aren't in a sane range --- diff --git a/SDL-1.2.15-ignore_insane_joystick_axis.patch b/SDL-1.2.15-ignore_insane_joystick_axis.patch new file mode 100644 index 0000000..33340fd --- /dev/null +++ b/SDL-1.2.15-ignore_insane_joystick_axis.patch @@ -0,0 +1,20 @@ +changeset: 6324:95abff7adcc2 +branch: SDL-1.2 +parent: 6306:2b923729fd01 +user: Ryan C. Gordon +date: Sun Jun 03 04:49:25 2012 -0400 +summary: Linux evdev: ignore joystick axis events if they aren't in a sane range. + +diff -r 2b923729fd01 -r 95abff7adcc2 src/joystick/linux/SDL_sysjoystick.c +--- a/src/joystick/linux/SDL_sysjoystick.c Sat May 12 23:32:51 2012 -0700 ++++ b/src/joystick/linux/SDL_sysjoystick.c Sun Jun 03 04:49:25 2012 -0400 +@@ -1106,6 +1106,9 @@ + } + break; + case EV_ABS: ++ if (code > ABS_MISC) { ++ break; ++ } + switch (code) { + case ABS_HAT0X: + case ABS_HAT0Y: diff --git a/SDL.spec b/SDL.spec index 9a5d4a3..554ffe5 100644 --- a/SDL.spec +++ b/SDL.spec @@ -10,7 +10,7 @@ Name: SDL Version: 1.2.15 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A cross-platform multimedia library Group: System Environment/Libraries URL: http://www.libsdl.org/ @@ -32,6 +32,8 @@ Patch2: SDL-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch Patch3: SDL-1.2.15-const_XData32.patch # sdl-config(1) manual from Debian, rh948864 Patch4: SDL-1.2.15-add_sdl_config_man.patch +# Upstream fix for sdl1486, rh990677 +Patch5: SDL-1.2.15-ignore_insane_joystick_axis.patch BuildRequires: alsa-lib-devel %if %{with arts} @@ -99,6 +101,7 @@ applications. %patch2 -p1 -b .gamma %patch3 -p1 -b .XData32 %patch4 -p1 -b .sdl_config_man +%patch5 -p1 -b .insane_axis for F in CREDITS; do iconv -f iso8859-1 -t utf-8 < "$F" > "${F}.utf" touch --reference "$F" "${F}.utf" @@ -174,6 +177,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Thu Dec 05 2013 Petr Pisar - 1.2.15-12 +- Ignore joystick axis events if they aren't in a sane range (bug #990677) + * Tue Jul 30 2013 Petr Pisar - 1.2.15-11 - Fix a typo in controlling NAS support