2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

input_common: Fix udp motion not automapping to both sides

This commit is contained in:
german77 2022-01-07 16:03:09 -06:00
parent a95c49e7d0
commit d05675242a

View file

@ -442,14 +442,22 @@ MotionMapping UDPClient::GetMotionMappingForDevice(const Common::ParamPackage& p
} }
MotionMapping mapping = {}; MotionMapping mapping = {};
Common::ParamPackage motion_params; Common::ParamPackage left_motion_params;
motion_params.Set("engine", GetEngineName()); left_motion_params.Set("engine", GetEngineName());
motion_params.Set("guid", params.Get("guid", "")); left_motion_params.Set("guid", params.Get("guid", ""));
motion_params.Set("port", params.Get("port", 0)); left_motion_params.Set("port", params.Get("port", 0));
motion_params.Set("pad", params.Get("pad", 0)); left_motion_params.Set("pad", params.Get("pad", 0));
motion_params.Set("motion", 0); left_motion_params.Set("motion", 0);
mapping.insert_or_assign(Settings::NativeMotion::MotionLeft, std::move(motion_params));
mapping.insert_or_assign(Settings::NativeMotion::MotionRight, std::move(motion_params)); Common::ParamPackage right_motion_params;
right_motion_params.Set("engine", GetEngineName());
right_motion_params.Set("guid", params.Get("guid", ""));
right_motion_params.Set("port", params.Get("port", 0));
right_motion_params.Set("pad", params.Get("pad", 0));
right_motion_params.Set("motion", 0);
mapping.insert_or_assign(Settings::NativeMotion::MotionLeft, std::move(left_motion_params));
mapping.insert_or_assign(Settings::NativeMotion::MotionRight, std::move(right_motion_params));
return mapping; return mapping;
} }