CommonHostInterface: Reimplement controller rumble support

Even better than before, supports separate motor control.
This commit is contained in:
Connor McLaughlin
2020-04-14 16:34:39 +10:00
parent 7677c95fa7
commit d9ebb975b2
16 changed files with 242 additions and 38 deletions

View File

@ -94,6 +94,22 @@ Controller::ButtonList Controller::GetButtonNames(ControllerType type)
}
}
u32 Controller::GetVibrationMotorCount(ControllerType type)
{
switch (type)
{
case ControllerType::DigitalController:
return DigitalController::StaticGetVibrationMotorCount();
case ControllerType::AnalogController:
return AnalogController::StaticGetVibrationMotorCount();
case ControllerType::None:
default:
return 0;
}
}
std::optional<s32> Controller::GetAxisCodeByName(ControllerType type, std::string_view axis_name)
{
switch (type)