[mupen64plus-input-sdl] 150/196: Imported Upstream version 2.0

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:00:35 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 65abbf0ee3b7dfac9cee1be65b5c6deae666dca4
Author: Sven Eckelmann <sven at narfation.org>
Date:   Fri Jul 5 09:38:07 2013 +0200

    Imported Upstream version 2.0
---
 LICENSES               |  3 ++-
 README                 | 25 +++++++++++++++++++++++--
 RELEASE                | 12 ++++++++++++
 data/InputAutoCfg.ini  |  1 +
 projects/unix/Makefile |  2 +-
 src/config.c           | 15 +++++++++++++++
 src/plugin.c           |  9 ++++++---
 src/version.h          |  2 +-
 8 files changed, 61 insertions(+), 8 deletions(-)

diff --git a/LICENSES b/LICENSES
index a14c6fc..0d30700 100644
--- a/LICENSES
+++ b/LICENSES
@@ -3,8 +3,9 @@ Mupen64Plus-input-sdl LICENSE
 
 Mupen64Plus-input-sdl is licensed under the GNU General Public License version 2.
 
-The authors of Mupen64Plus are:
+The authors of Mupen64Plus-input-sdl are:
   * Richard Goedeken (Richard42)
+  * Sven Eckelmann (ecsv)
   * John Chadwick (NMN)
   * James Hood (Ebenblues)
   * Scott Gorman (okaygo)
diff --git a/README b/README
index 41e5843..e9e049a 100644
--- a/README
+++ b/README
@@ -1,4 +1,23 @@
-********Notes about usage of SDL input plugin:
+===============================================================================
+-------------------------------------------------------------------------------
+Mupen64plus-input-sdl README                                               v2.0
+-------------------------------------------------------------------------------
+===============================================================================
+
+The latest documentation for this plugin can be found in wiki format at:
+
+https://code.google.com/p/mupen64plus/wiki/KeyboardSetup
+https://code.google.com/p/mupen64plus/wiki/ControllerSetup
+
+The format and usage of this plugin's "mupen64plus.cfg" configuration options
+can be found at:
+
+http://mupen64plus.retrouprising.com/mediawiki/index.php?title=Mupen64Plus_Plugin_Parameters#Input-SDL
+
+-------------------------------------------------------------------------------
+Notes about usage of SDL input plugin:
+-------------------------------------------------------------------------------
+
  - If one of the enabled controllers has the "mouse" general-purpose config parameters set
    to True, the plugin will hide the mouse cursor and 'grab' the mouse pointer.  The user
    may press the Left Control and Alt keys together to toggle the mouse cursor on and off.
@@ -6,7 +25,9 @@
    being pressed all the way to the edge.  To decrease the amount of simulated joystick
    deflection, the user may press Right Control, Right Shift, or Right Ctrl+Right Shift.
 
-********Notes for supported joysticks for auto-configuration:
+-------------------------------------------------------------------------------
+Notes for supported joysticks for auto-configuration:
+-------------------------------------------------------------------------------
 
 1. Jess Tech Rumble Pad (Saitek Rumble)
 The left D-pad is mapped to the D-pad; The joystick is mapped to the left joystick of the gamepad; the C buttons are mapped to the gampad's right joystick. Start button is mapped to start; the A-button is mapped to the lowest button on the gamepad's right front; the B-button to the left button (buttons marked 3 and 1 on my gamepad). The L and R buttons are mapped to the lower left and right rear triggers; the Z button is mapped to the left upper rear trigger. All other buttons are unused. 
diff --git a/RELEASE b/RELEASE
index 5fa9011..49a935f 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,6 +1,18 @@
 SDL Input plugin for Mupen64Plus
 --------------------------------
 
+Mupen64Plus-input-sdl v2.0 - July 4, 2013
+-----------------------------------------
+ - re-write auto-configuration logic to be more user friendly.  Add new 'mode' parameter.
+ - support for 6 new joysticks
+ - work-around for buggy xboxdrv which results in no rumble
+ - bugfix: crash when rumble used with controller #4
+ - support to build against SDL2
+ - Project files for Visual Studio 2012
+ - Makefile changes
+   - add support for PowerPC and MinGW32 builds
+   - add cross-compiling support to build Win32 executables (MXE) under Linux
+
 Mupen64Plus-input-sdl v1.99.5 - March 10, 2012
 -------------------------------------------------
  - Improved input setup behavior (auto-config) to make some use cases more friendly
diff --git a/data/InputAutoCfg.ini b/data/InputAutoCfg.ini
index a33a64c..e45b10a 100644
--- a/data/InputAutoCfg.ini
+++ b/data/InputAutoCfg.ini
@@ -663,6 +663,7 @@ Rumblepak switch =
 Y Axis = axis(1-,1+)
 X Axis = axis(0-,0+)
 
+[SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller]
 [PLAYSTATION(R)3 Controller]
 plugged = True
 plugin = 2
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index fb21916..0e3a3a9 100644
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -117,7 +117,7 @@ endif
 # base CFLAGS, LDLIBS, and LDFLAGS
 OPTFLAGS ?= -O3 -flto
 WARNFLAGS ?= -Wall
-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src
+CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src -D_GNU_SOURCE=1
 LDFLAGS += $(SHARED)
 
 # Since we are building a shared library, we must compile with -fPIC on some architectures
diff --git a/src/config.c b/src/config.c
index b97fcea..1a6fa55 100644
--- a/src/config.c
+++ b/src/config.c
@@ -673,7 +673,15 @@ void load_configuration(int bPreConfig)
                 /* set up one or more controllers for this SDL device, if present in InputAutoConfig.ini */
                 int ControllersFound = setup_auto_controllers(bPreConfig, n64CtrlIdx, sdlCtrlIdx, sdl_name, ControlMode, OrigControlMode, DeviceName);
                 if (ControllersFound == 0)
+                {
+                    // error: no auto-config found for this SDL device
                     DebugMessage(M64MSG_ERROR, "No auto-config found for joystick named '%s' in InputAutoConfig.ini", sdl_name);
+                    // mark this device as being used just so we don't complain about it again
+                    sdlDevicesUsed[sdlNumDevUsed++] = sdlCtrlIdx;
+                    // quit looking for SDL joysticks which match the name, because there's no valid autoconfig for that name.
+                    // this controller will be unused; skip to the next one
+                    break;
+                }
                 /* mark this sdl device as used */
                 sdlDevicesUsed[sdlNumDevUsed++] = sdlCtrlIdx;
                 ActiveControllers += ControllersFound;
@@ -711,7 +719,14 @@ void load_configuration(int bPreConfig)
             sdl_name = get_sdl_joystick_name(sdlCtrlIdx);
             ControllersFound = setup_auto_controllers(bPreConfig, n64CtrlIdx, sdlCtrlIdx, sdl_name, ControlMode, OrigControlMode, DeviceName);
             if (!bPreConfig && ControllersFound == 0)
+            {
+                // error: no auto-config found for this SDL device
                 DebugMessage(M64MSG_ERROR, "No auto-config found for joystick named '%s' in InputAutoConfig.ini", sdl_name);
+                // mark this device as being used just so we don't complain about it again
+                sdlDevicesUsed[sdlNumDevUsed++] = sdlCtrlIdx;
+                // keep trying more SDL devices to see if we can auto-config one for this N64 controller
+                continue;
+            }
             /* mark this sdl device as used */
             sdlDevicesUsed[sdlNumDevUsed++] = sdlCtrlIdx;
             ActiveControllers += ControllersFound;
diff --git a/src/plugin.c b/src/plugin.c
index 8ce635c..26b1814 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -112,9 +112,9 @@ static int romopen = 0;         // is a rom opened
 static unsigned char myKeyState[SDL_NUM_SCANCODES];
 
 #ifdef __linux__
-static struct ff_effect ffeffect[3];
-static struct ff_effect ffstrong[3];
-static struct ff_effect ffweak[3];
+static struct ff_effect ffeffect[4];
+static struct ff_effect ffstrong[4];
+static struct ff_effect ffweak[4];
 #endif //__linux__
 
 /* Global functions */
@@ -735,6 +735,9 @@ static void InitiateRumble(int cntrl)
     ffeffect[cntrl].id = -1;
     ffeffect[cntrl].u.rumble.strong_magnitude = 0xFFFF;
     ffeffect[cntrl].u.rumble.weak_magnitude = 0xFFFF;
+    ffeffect[cntrl].replay.length = 0x7fff;             // hack: xboxdrv is buggy and doesn't support infinite replay.
+                                                        // when xboxdrv is fixed (https://github.com/Grumbel/xboxdrv/issues/47),
+                                                        // please remove this
 
     ioctl(controller[cntrl].event_joystick, EVIOCSFF, &ffeffect[cntrl]);
 
diff --git a/src/version.h b/src/version.h
index d85e1ed..1bd0b08 100644
--- a/src/version.h
+++ b/src/version.h
@@ -27,7 +27,7 @@
 #define VERSION_H
 
 #define PLUGIN_NAME    "Mupen64Plus SDL Input Plugin"
-#define PLUGIN_VERSION           0x016305
+#define PLUGIN_VERSION           0x020000
 #define INPUT_PLUGIN_API_VERSION 0x020000
 #define CONFIG_API_VERSION       0x020100
 

-- 
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