Try to prevent configuring a gamepad by pressing on the wrong gamepad
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10307 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
150cc190b0
commit
d4a57fc833
@ -381,6 +381,10 @@ void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string gamepad_name = input_manager->getDeviceList()->getGamePadFromIrrID(sensed_input.m_device_id)->m_name;
|
||||||
|
if (m_config->getName() == gamepad_name)
|
||||||
|
{
|
||||||
GamepadConfig* config = (GamepadConfig*)m_config;
|
GamepadConfig* config = (GamepadConfig*)m_config;
|
||||||
config->setBinding(binding_to_set, sensed_input.m_type,
|
config->setBinding(binding_to_set, sensed_input.m_type,
|
||||||
sensed_input.m_button_id,
|
sensed_input.m_button_id,
|
||||||
@ -389,6 +393,7 @@ void OptionsScreenInput2::gotSensedInput(const Input& sensed_input)
|
|||||||
// refresh display
|
// refresh display
|
||||||
updateInputButtons();
|
updateInputButtons();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user