InputManager: Missing motor bindings are not errors

This commit is contained in:
Connor McLaughlin 2022-02-05 23:33:41 +10:00 committed by refractionpcsx2
parent 1ea38b1981
commit d9d2022096
1 changed files with 6 additions and 6 deletions

View File

@ -594,16 +594,16 @@ void InputManager::AddPadBindings(SettingsInterface& si, u32 pad_index, const ch
{
case PAD::VibrationCapabilities::LargeSmallMotors:
{
const std::string large_binding(si.GetStringValue(section.c_str(), "LargeMotor"));
const std::string small_binding(si.GetStringValue(section.c_str(), "SmallMotor"));
if (const std::string large_binding(si.GetStringValue(section.c_str(), "LargeMotor")); !large_binding.empty())
has_any_bindings |= ParseBindingAndGetSource(large_binding, &vib.motors[0].binding, &vib.motors[0].source);
if (const std::string small_binding(si.GetStringValue(section.c_str(), "SmallMotor")); !small_binding.empty())
has_any_bindings |= ParseBindingAndGetSource(small_binding, &vib.motors[1].binding, &vib.motors[1].source);
}
break;
case PAD::VibrationCapabilities::SingleMotor:
{
const std::string binding(si.GetStringValue(section.c_str(), "Motor"));
if (const std::string binding(si.GetStringValue(section.c_str(), "Motor")); !binding.empty())
has_any_bindings |= ParseBindingAndGetSource(binding, &vib.motors[0].binding, &vib.motors[0].source);
}
break;