diff options
author | bunnei <bunneidev@gmail.com> | 2022-01-08 22:41:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-08 22:41:39 +0100 |
commit | acbfb0083a611a974b887f6a5d63b55e444b1e89 (patch) | |
tree | 0fb8395bbe2a062295c3811931081af0c116e9cf /src/input_common | |
parent | Merge pull request #7680 from german77/accel_mapping (diff) | |
parent | yuzu: Use pad parameter to choose the correct controller (diff) | |
download | yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar.gz yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar.bz2 yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar.lz yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar.xz yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar.zst yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.zip |
Diffstat (limited to 'src/input_common')
-rw-r--r-- | src/input_common/drivers/udp_client.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index a1ce4525d..c8a12c7d5 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp @@ -442,14 +442,22 @@ MotionMapping UDPClient::GetMotionMappingForDevice(const Common::ParamPackage& p } MotionMapping mapping = {}; - Common::ParamPackage motion_params; - motion_params.Set("engine", GetEngineName()); - motion_params.Set("guid", params.Get("guid", "")); - motion_params.Set("port", params.Get("port", 0)); - motion_params.Set("pad", params.Get("pad", 0)); - 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 left_motion_params; + left_motion_params.Set("engine", GetEngineName()); + left_motion_params.Set("guid", params.Get("guid", "")); + left_motion_params.Set("port", params.Get("port", 0)); + left_motion_params.Set("pad", params.Get("pad", 0)); + left_motion_params.Set("motion", 0); + + 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; } |