Skip to content

Commit

Permalink
Merge pull request #7104 from Memphiz/fixjoystickmapping
Browse files Browse the repository at this point in the history
[KeyMapping/Joystick] - fix regression introduced in https://github.c…
  • Loading branch information
Memphiz committed May 14, 2015
2 parents 5c65f4c + 3603909 commit 1993d12
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions xbmc/input/ButtonTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,17 @@ void CButtonTranslator::MapJoystickActions(int windowID, TiXmlNode *pJoystick)

pButton = pButton->NextSiblingElement();
}
m_joystickButtonMap[joyFamilyName][windowID].insert(buttonMap.begin(), buttonMap.end());
m_joystickAxisMap[joyFamilyName][windowID].insert(axisMap.begin(), axisMap.end());
m_joystickHatMap[joyFamilyName][windowID].insert(hatMap.begin(), hatMap.end());

// add/overwrite keys with mapped actions
for (auto button : buttonMap)
m_joystickButtonMap[joyFamilyName][windowID][button.first] = button.second;

for (auto axis : axisMap)
m_joystickAxisMap[joyFamilyName][windowID][axis.first] = axis.second;

for (auto hat : hatMap)
m_joystickHatMap[joyFamilyName][windowID][hat.first] = hat.second;

if (windowID == -1)
m_joystickAxesConfigs[joyFamilyName] = axesConfig;
}
Expand Down

0 comments on commit 1993d12

Please sign in to comment.