CommonHostInterface: Fix rumble not applying to non-first controller

This commit is contained in:
Connor McLaughlin 2021-04-08 11:33:59 +10:00
parent fc9d276435
commit deeb861918

View file

@ -1361,7 +1361,7 @@ void CommonHostInterface::ClearInputMap()
void CommonHostInterface::AddControllerRumble(u32 controller_index, u32 num_motors, ControllerRumbleCallback callback) void CommonHostInterface::AddControllerRumble(u32 controller_index, u32 num_motors, ControllerRumbleCallback callback)
{ {
ControllerRumbleState rumble; ControllerRumbleState rumble;
rumble.controller_index = 0; rumble.controller_index = controller_index;
rumble.num_motors = std::min<u32>(num_motors, ControllerRumbleState::MAX_MOTORS); rumble.num_motors = std::min<u32>(num_motors, ControllerRumbleState::MAX_MOTORS);
rumble.last_strength.fill(0.0f); rumble.last_strength.fill(0.0f);
rumble.update_callback = std::move(callback); rumble.update_callback = std::move(callback);