[mupen64plus-input-sdl] 141/196: Use correct ff length even when xboxdrv is broken

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:00:33 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 b51a93951bea716c810f529bd676360c654285d3
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sun Jun 23 11:03:41 2013 +0200

    Use correct ff length even when xboxdrv is broken
---
 debian/patches/sdl2_forcefeedback.patch | 17 +++++++++--------
 debian/patches/sdl2_mousemode.patch     |  6 +++---
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/debian/patches/sdl2_forcefeedback.patch b/debian/patches/sdl2_forcefeedback.patch
index 7cebc9f..db7e523 100644
--- a/debian/patches/sdl2_forcefeedback.patch
+++ b/debian/patches/sdl2_forcefeedback.patch
@@ -3,7 +3,7 @@ Author: Sven Eckelmann <sven at narfation.org>
 
 ---
 diff --git a/src/plugin.c b/src/plugin.c
-index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b2dcc909a 100644
+index 8ce635c592f35d774d0ab8fadd25160328d03796..0a44f01e501785ed06331f5c0a5ff509e1e544f7 100644
 --- a/src/plugin.c
 +++ b/src/plugin.c
 @@ -111,7 +111,14 @@ static int romopen = 0;         // is a rom opened
@@ -70,7 +70,7 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
      if (controller[Control].event_joystick != 0)
      {
          struct input_event play;
-@@ -657,9 +694,81 @@ EXPORT void CALL GetKeys( int Control, BUTTONS *Keys )
+@@ -657,9 +694,82 @@ EXPORT void CALL GetKeys( int Control, BUTTONS *Keys )
      controller[Control].buttons.Value = 0;
  }
  
@@ -94,10 +94,12 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
 +
 +static void DeinitJoystick(int cntrl)
 +{
++#if SDL_VERSION_ATLEAST(2,0,0)
 +    if (controller[cntrl].joystick) {
 +        SDL_JoystickClose(controller[cntrl].joystick);
 +        controller[cntrl].joystick = NULL;
 +    }
++#endif
 +}
 +
  static void InitiateRumble(int cntrl)
@@ -127,8 +129,7 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
 +    ffeffect[cntrl].type = SDL_HAPTIC_SINE;
 +    ffeffect[cntrl].periodic.period = 1000;
 +    ffeffect[cntrl].periodic.magnitude = 0x7FFF;
-+    // TODO this should have been SDL_HAPTIC_INFINITY but doesnt work with xboxdrv?
-+    ffeffect[cntrl].periodic.length = 0x7FFF;
++    ffeffect[cntrl].periodic.length = SDL_HAPTIC_INFINITY;
 +
 +    ffeffect_id[cntrl] = SDL_HapticNewEffect(controller[cntrl].event_joystick, &ffeffect[cntrl]);
 +
@@ -153,7 +154,7 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
      DIR* dp;
      struct dirent* ep;
      unsigned long features[4];
-@@ -760,6 +869,19 @@ static void InitiateRumble(int cntrl)
+@@ -760,6 +870,19 @@ static void InitiateRumble(int cntrl)
  #endif /* __linux__ */
  }
  
@@ -173,7 +174,7 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
  /******************************************************************
    Function: InitiateControllers
    Purpose:  This function initialises how each of the controllers
-@@ -790,10 +912,13 @@ EXPORT void CALL InitiateControllers(CONTROL_INFO ControlInfo)
+@@ -790,10 +913,13 @@ EXPORT void CALL InitiateControllers(CONTROL_INFO ControlInfo)
      for( i = 0; i < 4; i++ )
      {
          // test for rumble support for this joystick
@@ -187,7 +188,7 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
      }
  
      DebugMessage(M64MSG_INFO, "%s version %i.%i.%i initialized.", PLUGIN_NAME, VERSION_PRINTF_SPLIT(PLUGIN_VERSION));
-@@ -830,12 +955,10 @@ EXPORT void CALL RomClosed(void)
+@@ -830,12 +956,10 @@ EXPORT void CALL RomClosed(void)
      int i;
  
      // close joysticks
@@ -204,7 +205,7 @@ index 8ce635c592f35d774d0ab8fadd25160328d03796..e47d1d4411218aa65a6b6ddb4e458d5b
  
      // quit SDL joystick subsystem
      SDL_QuitSubSystem( SDL_INIT_JOYSTICK );
-@@ -871,15 +994,10 @@ EXPORT int CALL RomOpen(void)
+@@ -871,15 +995,10 @@ EXPORT int CALL RomOpen(void)
          }
  
      // open joysticks
diff --git a/debian/patches/sdl2_mousemode.patch b/debian/patches/sdl2_mousemode.patch
index 5d024c1..2b5a9b0 100644
--- a/debian/patches/sdl2_mousemode.patch
+++ b/debian/patches/sdl2_mousemode.patch
@@ -3,7 +3,7 @@ Author: Sven Eckelmann <sven at narfation.org>
 
 ---
 diff --git a/src/plugin.c b/src/plugin.c
-index e47d1d4411218aa65a6b6ddb4e458d5b2dcc909a..865054c59fb7bb600714fcf8be56145c8638aeac 100644
+index 0a44f01e501785ed06331f5c0a5ff509e1e544f7..341fa767694899773f072be9a96dd23f8ad65713 100644
 --- a/src/plugin.c
 +++ b/src/plugin.c
 @@ -313,7 +313,7 @@ doSdlKeys(unsigned char* keystate)
@@ -61,7 +61,7 @@ index e47d1d4411218aa65a6b6ddb4e458d5b2dcc909a..865054c59fb7bb600714fcf8be56145c
          {
              mousex_residual = 0;
              mousey_residual = 0;
-@@ -965,7 +981,7 @@ EXPORT void CALL RomClosed(void)
+@@ -966,7 +982,7 @@ EXPORT void CALL RomClosed(void)
  
      // release/ungrab mouse
  #if SDL_VERSION_ATLEAST(2,0,0)
@@ -70,7 +70,7 @@ index e47d1d4411218aa65a6b6ddb4e458d5b2dcc909a..865054c59fb7bb600714fcf8be56145c
  #else
      SDL_WM_GrabInput( SDL_GRAB_OFF );
  #endif
-@@ -1002,10 +1018,12 @@ EXPORT int CALL RomOpen(void)
+@@ -1003,10 +1019,12 @@ EXPORT int CALL RomOpen(void)
      // grab mouse
      if (controller[0].mouse || controller[1].mouse || controller[2].mouse || controller[3].mouse)
      {

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