summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-06-07 07:48:05 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-06-07 07:48:05 +0000
commit4ab6a6c0d527401ed32d8d933d2b064b0617a6e4 (patch)
tree9715ab16edc50ac1dbb5d8856cb776c279844d1d /media-libs/libsdl
parentpatch for gcc3 (bug #53013); tidy (Manifest recommit) (diff)
downloadgentoo-2-4ab6a6c0d527401ed32d8d933d2b064b0617a6e4.tar.gz
gentoo-2-4ab6a6c0d527401ed32d8d933d2b064b0617a6e4.tar.bz2
gentoo-2-4ab6a6c0d527401ed32d8d933d2b064b0617a6e4.zip
added patch from libsdl cvs from bug #52833
Diffstat (limited to 'media-libs/libsdl')
-rw-r--r--media-libs/libsdl/ChangeLog6
-rw-r--r--media-libs/libsdl/files/1.2.7-joystick.patch46
-rw-r--r--media-libs/libsdl/libsdl-1.2.7-r1.ebuild3
3 files changed, 53 insertions, 2 deletions
diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog
index 79c51eac8aae..62c65222f93c 100644
--- a/media-libs/libsdl/ChangeLog
+++ b/media-libs/libsdl/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-libs/libsdl
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.47 2004/06/02 14:15:38 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.48 2004/06/07 07:48:05 mr_bones_ Exp $
+
+ 07 Jun 2004; Michael Sterrett <mr_bones_@gentoo.org> libsdl-1.2.7-r1.ebuild,
+ files/1.2.7-joystick.patch:
+ added patch from libsdl cvs from bug #52833
01 Jun 2004; Travis Tilley <lv@gentoo.org> libsdl-1.2.7-r1.ebuild:
stable on amd64
diff --git a/media-libs/libsdl/files/1.2.7-joystick.patch b/media-libs/libsdl/files/1.2.7-joystick.patch
new file mode 100644
index 000000000000..d18b398e8974
--- /dev/null
+++ b/media-libs/libsdl/files/1.2.7-joystick.patch
@@ -0,0 +1,46 @@
+diff -u -r1.13 -r1.14
+--- SDL12/src/joystick/linux/SDL_sysjoystick.c 2004/01/04 16:49:18 1.13
++++ SDL12/src/joystick/linux/SDL_sysjoystick.c 2004/03/05 15:09:18 1.14
+@@ -22,7 +22,7 @@
+
+ #ifdef SAVE_RCSID
+ static char rcsid =
+- "@(#) $Id: 1.2.7-joystick.patch,v 1.1 2004/06/07 07:48:05 mr_bones_ Exp $";
++ "@(#) $Id: 1.2.7-joystick.patch,v 1.1 2004/06/07 07:48:05 mr_bones_ Exp $";
+ #endif
+
+ /* This is the system specific header for the SDL joystick API */
+@@ -383,7 +383,7 @@
+
+ static SDL_bool EV_ConfigJoystick(SDL_Joystick *joystick, int fd)
+ {
+- int i;
++ int i, t;
+ unsigned long keybit[40];
+ unsigned long absbit[40];
+ unsigned long relbit[40];
+@@ -436,12 +436,18 @@
+ joystick->hwdata->abs_correct[i].used = 0;
+ } else {
+ joystick->hwdata->abs_correct[i].used = 1;
+- joystick->hwdata->abs_correct[i].coef[0] =
+- (values[2] + values[1]) / 2 - values[4];
+- joystick->hwdata->abs_correct[i].coef[1] =
+- (values[2] + values[1]) / 2 + values[4];
+- joystick->hwdata->abs_correct[i].coef[2] =
+- (1 << 29) / ((values[2] - values[1]) / 2 - 2 * values[4]);
++ t = (2 - values[4]);
++ if ( t != 0 ) {
++ joystick->hwdata->abs_correct[i].coef[0] = (values[2] + values[1]) / t;
++ }
++ t = (2 + values[4]);
++ if ( t != 0 ) {
++ joystick->hwdata->abs_correct[i].coef[1] = (values[2] + values[1]) / t;
++ }
++ t = ((values[2] - values[1]) / 2 - 2 * values[4]);
++ if ( t != 0 ) {
++ joystick->hwdata->abs_correct[i].coef[2] = (1 << 29) / t;
++ }
+ }
+ ++joystick->naxes;
+ }
diff --git a/media-libs/libsdl/libsdl-1.2.7-r1.ebuild b/media-libs/libsdl/libsdl-1.2.7-r1.ebuild
index f7606f8f6cd1..38eedc67be17 100644
--- a/media-libs/libsdl/libsdl-1.2.7-r1.ebuild
+++ b/media-libs/libsdl/libsdl-1.2.7-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.7-r1.ebuild,v 1.3 2004/06/02 14:15:38 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.7-r1.ebuild,v 1.4 2004/06/07 07:48:05 mr_bones_ Exp $
inherit fixheadtails eutils
@@ -38,6 +38,7 @@ src_unpack() {
epatch ${FILESDIR}/${PV}-nobuggy-X.patch #30089
epatch ${FILESDIR}/${PV}-libcaca.patch #40224
epatch ${FILESDIR}/${PV}-gcc34.patch #48947
+ epatch ${FILESDIR}/${PV}-joystick.patch #52833
ht_fix_file configure.in