Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed, ProcessJoystickEvent was broke for axis handling

  • Loading branch information...
commit 6c11ee3335e9b787d7e85638bbcebf05e2890d57 1 parent b781c57
@davilla davilla authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 xbmc/Application.cpp
View
10 xbmc/Application.cpp
@@ -3086,11 +3086,17 @@ bool CApplication::ProcessJoystickEvent(const std::string& joystickName, int wKe
int iWin = GetActiveWindowID();
int actionID;
CStdString actionName;
- bool fullRange = false;
+ bool fullrange;
+ if (isAxis && fAmount < 0.0)
+ wKeyID = -wKeyID;
// Translate using regular joystick translator.
- if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, joystickName.c_str(), wKeyID, isAxis ? JACTIVE_AXIS : JACTIVE_BUTTON, actionID, actionName, fullRange))
+ if (CButtonTranslator::GetInstance().TranslateJoystickString(iWin, joystickName.c_str(), wKeyID, isAxis ? JACTIVE_AXIS : JACTIVE_BUTTON, actionID, actionName, fullrange))
+ {
+ if (isAxis)
+ fAmount = fullrange ? (fAmount + 1.0f)/2.0f : fabs(fAmount);
return ExecuteInputAction( CAction(actionID, fAmount, 0.0f, actionName, holdTime) );
+ }
else
CLog::Log(LOGDEBUG, "ERROR mapping joystick action. Joystick: %s %i",joystickName.c_str(), wKeyID);
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.