summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-12-06 00:21:01 +0100
committerLioncash <mathew1800@gmail.com>2022-12-06 00:27:15 +0100
commit87543b9dea9c7d5644269f5bbe1f278a54a84bea (patch)
tree4d109b7ecff9353219d39742ce61d3f406123920 /src
parentemulated_console: Amend cast in SetTouch() (diff)
downloadyuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.tar
yuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.tar.gz
yuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.tar.bz2
yuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.tar.lz
yuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.tar.xz
yuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.tar.zst
yuzu-87543b9dea9c7d5644269f5bbe1f278a54a84bea.zip
Diffstat (limited to '')
-rw-r--r--src/core/hid/emulated_controller.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 74c877728..09f870eb0 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -432,7 +432,7 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
continue;
}
const auto devices_it = std::find_if(
- devices.begin(), devices.end(), [param](const Common::ParamPackage param_) {
+ devices.begin(), devices.end(), [&param](const Common::ParamPackage& param_) {
return param.Get("engine", "") == param_.Get("engine", "") &&
param.Get("guid", "") == param_.Get("guid", "") &&
param.Get("port", 0) == param_.Get("port", 0) &&
@@ -441,12 +441,12 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
if (devices_it != devices.end()) {
continue;
}
- Common::ParamPackage device{};
+
+ auto& device = devices.emplace_back();
device.Set("engine", param.Get("engine", ""));
device.Set("guid", param.Get("guid", ""));
device.Set("port", param.Get("port", 0));
device.Set("pad", param.Get("pad", 0));
- devices.push_back(device);
}
for (const auto& param : stick_params) {
@@ -457,7 +457,7 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
continue;
}
const auto devices_it = std::find_if(
- devices.begin(), devices.end(), [param](const Common::ParamPackage param_) {
+ devices.begin(), devices.end(), [&param](const Common::ParamPackage& param_) {
return param.Get("engine", "") == param_.Get("engine", "") &&
param.Get("guid", "") == param_.Get("guid", "") &&
param.Get("port", 0) == param_.Get("port", 0) &&
@@ -466,12 +466,12 @@ std::vector<Common::ParamPackage> EmulatedController::GetMappedDevices(
if (devices_it != devices.end()) {
continue;
}
- Common::ParamPackage device{};
+
+ auto& device = devices.emplace_back();
device.Set("engine", param.Get("engine", ""));
device.Set("guid", param.Get("guid", ""));
device.Set("port", param.Get("port", 0));
device.Set("pad", param.Get("pad", 0));
- devices.push_back(device);
}
return devices;
}