Apply slighly modified version of patch from ticket #1121

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15013 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2014-01-12 18:04:00 +00:00
parent 55d085bf6d
commit 03618a5bc5

View File

@ -479,6 +479,15 @@ void InputManager::dispatchInput(Input::InputType type, int deviceID,
if (m_mode == INPUT_SENSE_KEYBOARD ||
m_mode == INPUT_SENSE_GAMEPAD)
{
// Do not pick disabled gamepads for input sensing
if (type == Input::IT_STICKBUTTON || type == Input::IT_STICKMOTION)
{
GamePadDevice *gPad = m_device_manager->getGamePadFromIrrID(deviceID);
DeviceConfig *conf = gPad->getConfiguration();
if (!conf->isEnabled())
return;
}
inputSensing(type, deviceID, button, axisDirection, value);
return;
}