Add default setting for binding which STICKBUTTON uses

This commit is contained in:
Benau 2020-04-21 00:54:20 +08:00
parent 130be12a64
commit d3f45e84a3
2 changed files with 4 additions and 1 deletions

View File

@ -55,7 +55,9 @@ bool Binding::load(const XMLNode *action)
return false;
}
m_type = (Input::InputType)n;
// Default settings for button
m_range = Input::AR_HALF;
m_dir = Input::AD_NEUTRAL;
m_character = 0;
// XMLNode only supports stringw, not wchar_t*
core::stringw s;

View File

@ -567,6 +567,7 @@ void InputManager::inputSensing(Input::InputType type, int deviceID,
sensed_input.m_device_id = deviceID;
sensed_input.m_button_id = button;
sensed_input.m_character = deviceID;
sensed_input.m_axis_direction = Input::AD_NEUTRAL;
OptionsScreenDevice::getInstance()->gotSensedInput(sensed_input);
return;
}