Skip to content
This repository
Browse code

Revert "fixed, ProcessJoystickEvent was broke for axis handling"

This reverts commit 6c11ee3.
  • Loading branch information...
commit 6c0eab9b12e4b0f6896b14a6028e8fa5edb8610c 1 parent 6c11ee3
authored July 25, 2013

Showing 1 changed file with 2 additions and 8 deletions. Show diff stats Hide diff stats

  1. 10  xbmc/Application.cpp
10  xbmc/Application.cpp
@@ -3086,17 +3086,11 @@ bool CApplication::ProcessJoystickEvent(const std::string& joystickName, int wKe
3086 3086
    int iWin = GetActiveWindowID();
3087 3087
    int actionID;
3088 3088
    CStdString actionName;
3089  
-   bool fullrange;
  3089
+   bool fullRange = false;
3090 3090
 
3091  
-   if (isAxis && fAmount < 0.0)
3092  
-     wKeyID = -wKeyID;
3093 3091
    // Translate using regular joystick translator.
3094  
-   if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, joystickName.c_str(), wKeyID, isAxis ? JACTIVE_AXIS : JACTIVE_BUTTON, actionID, actionName, fullrange))
3095  
-   {
3096  
-     if (isAxis)
3097  
-       fAmount = fullrange ? (fAmount + 1.0f)/2.0f : fabs(fAmount);
  3092
+   if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, joystickName.c_str(), wKeyID, isAxis ? JACTIVE_AXIS : JACTIVE_BUTTON, actionID, actionName, fullRange))
3098 3093
      return ExecuteInputAction( CAction(actionID, fAmount, 0.0f, actionName, holdTime) );
3099  
-   }
3100 3094
    else
3101 3095
      CLog::Log(LOGDEBUG, "ERROR mapping joystick action. Joystick: %s %i",joystickName.c_str(), wKeyID);
3102 3096
 #endif

0 notes on commit 6c0eab9

Please sign in to comment.
Something went wrong with that request. Please try again.