[mupen64plus-input-sdl] 38/196: Correctly handle USB devices with multiple game pads

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:00:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch master
in repository mupen64plus-input-sdl.

commit 4fb8b398b62a59cd4bd368e18b18430bd5bfe1be
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date:   Fri Nov 26 13:37:04 2010 +0100

    Correctly handle USB devices with multiple game pads
---
 debian/changelog                                 |  2 ++
 debian/patches/2controllers-per-usb-device.patch | 31 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 3 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 38b0b97..aa78aed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,8 @@ mupen64plus-input-sdl (1.99.4-1) UNRELEASED; urgency=low
       dont-install-unneeded.patch, rice-ati-symbols.patch, link_gdk.patch
     - Rebase default-optimisations.patch against 1.99.4
     - Add hurd_os.patch, Add GNU/Hurd as operating system with "linux" userland
+    - Add 2controllers-per-usb-device.patch, Correctly handle USB devices with
+      multiple game pads
   * Convert to 3.0 (quilt) source format
   * debian/control:
     - Remove unneeded build dependency to quilt
diff --git a/debian/patches/2controllers-per-usb-device.patch b/debian/patches/2controllers-per-usb-device.patch
new file mode 100644
index 0000000..cf0aeb7
--- /dev/null
+++ b/debian/patches/2controllers-per-usb-device.patch
@@ -0,0 +1,31 @@
+Description: Correctly handle USB devices with multiple game pads
+Origin: upstream, http://bitbucket.org/richard42/mupen64plus-input-sdl/changeset/7fccdad2cdaf
+Author: Peter Helbing <phelbing at imap.cc>
+
+---
+diff --git a/src/config.c b/src/config.c
+index 583124c81af03f41656f51295f06214675b00483..86aa513079f586abb8c6f56961cd4e30c9253626 100644
+--- a/src/config.c
++++ b/src/config.c
+@@ -399,10 +399,11 @@ void load_configuration(int bPrintSummary)
+         sprintf(SectionName, "Input-SDL-Control%i", i + 1);
+         readOK = load_controller_config(SectionName, i);
+ 
+-        JoyName = get_sdl_joystick_name(i);
+         if (!readOK || controller[i].device == DEVICE_AUTO)
+         {
+             int ControllersFound = 0;
++            /* if auto / bad config, get joystick name based on SDL order */
++            JoyName = get_sdl_joystick_name(i);
+             /* reset the controller configuration again and try to auto-configure */
+             ControllersFound = auto_set_defaults(i, JoyName);
+             if (ControllersFound > 0)
+@@ -433,6 +434,8 @@ void load_configuration(int bPrintSummary)
+         }
+         else if (controller[i].device >= 0)
+         {
++            /* if joystick found in cfg, take its SDL number from there */
++            JoyName = get_sdl_joystick_name(controller[i].device);
+             /* valid joystick configuration was read; check if the specified joystick is available in SDL */
+             if (JoyName == NULL)
+             {
diff --git a/debian/patches/series b/debian/patches/series
index 16e335d..867c0ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 default-optimisations.patch
 hurd_os.patch
+2controllers-per-usb-device.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-input-sdl.git



More information about the Pkg-games-commits mailing list