diff options
| author | 2022-01-08 13:41:39 -0800 | |
|---|---|---|
| committer | 2022-01-08 13:41:39 -0800 | |
| commit | acbfb0083a611a974b887f6a5d63b55e444b1e89 (patch) | |
| tree | 0fb8395bbe2a062295c3811931081af0c116e9cf /src/input_common/drivers/udp_client.cpp | |
| 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.gz yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.tar.xz yuzu-acbfb0083a611a974b887f6a5d63b55e444b1e89.zip | |
Merge pull request #7682 from german77/udp_fix
input_common: Fix UDP controller mappings
Diffstat (limited to 'src/input_common/drivers/udp_client.cpp')
| -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 | |||
| 442 | } | 442 | } |
| 443 | 443 | ||
| 444 | MotionMapping mapping = {}; | 444 | MotionMapping mapping = {}; |
| 445 | Common::ParamPackage motion_params; | 445 | Common::ParamPackage left_motion_params; |
| 446 | motion_params.Set("engine", GetEngineName()); | 446 | left_motion_params.Set("engine", GetEngineName()); |
| 447 | motion_params.Set("guid", params.Get("guid", "")); | 447 | left_motion_params.Set("guid", params.Get("guid", "")); |
| 448 | motion_params.Set("port", params.Get("port", 0)); | 448 | left_motion_params.Set("port", params.Get("port", 0)); |
| 449 | motion_params.Set("pad", params.Get("pad", 0)); | 449 | left_motion_params.Set("pad", params.Get("pad", 0)); |
| 450 | motion_params.Set("motion", 0); | 450 | left_motion_params.Set("motion", 0); |
| 451 | mapping.insert_or_assign(Settings::NativeMotion::MotionLeft, std::move(motion_params)); | 451 | |
| 452 | mapping.insert_or_assign(Settings::NativeMotion::MotionRight, std::move(motion_params)); | 452 | Common::ParamPackage right_motion_params; |
| 453 | right_motion_params.Set("engine", GetEngineName()); | ||
| 454 | right_motion_params.Set("guid", params.Get("guid", "")); | ||
| 455 | right_motion_params.Set("port", params.Get("port", 0)); | ||
| 456 | right_motion_params.Set("pad", params.Get("pad", 0)); | ||
| 457 | right_motion_params.Set("motion", 0); | ||
| 458 | |||
| 459 | mapping.insert_or_assign(Settings::NativeMotion::MotionLeft, std::move(left_motion_params)); | ||
| 460 | mapping.insert_or_assign(Settings::NativeMotion::MotionRight, std::move(right_motion_params)); | ||
| 453 | return mapping; | 461 | return mapping; |
| 454 | } | 462 | } |
| 455 | 463 | ||