summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-01-07 23:03:09 +0100
committergerman77 <juangerman-13@hotmail.com>2022-01-07 23:56:36 +0100
commitd05675242a8b56189a8069f8ae561ed9670ad628 (patch)
treebaf02be7db8fac15a0169e0e279ffd1a3e987f7c /src/input_common
parentMerge pull request #7658 from ameerj/sparse-fixes (diff)
downloadyuzu-d05675242a8b56189a8069f8ae561ed9670ad628.tar
yuzu-d05675242a8b56189a8069f8ae561ed9670ad628.tar.gz
yuzu-d05675242a8b56189a8069f8ae561ed9670ad628.tar.bz2
yuzu-d05675242a8b56189a8069f8ae561ed9670ad628.tar.lz
yuzu-d05675242a8b56189a8069f8ae561ed9670ad628.tar.xz
yuzu-d05675242a8b56189a8069f8ae561ed9670ad628.tar.zst
yuzu-d05675242a8b56189a8069f8ae561ed9670ad628.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/drivers/udp_client.cpp24
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;
}