From 873d26b335d9b43d51100083a1b53f8733cb93b0 Mon Sep 17 00:00:00 2001 From: german77 Date: Fri, 7 Jan 2022 16:55:55 -0600 Subject: yuzu: Use pad parameter to choose the correct controller --- src/core/hid/emulated_controller.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/hid') diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 71fc05807..52a56ef1a 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -389,7 +389,8 @@ std::vector EmulatedController::GetMappedDevices( 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); + param.Get("port", 0) == param_.Get("port", 0) && + param.Get("pad", 0) == param_.Get("pad", 0); }); if (devices_it != devices.end()) { continue; @@ -398,6 +399,7 @@ std::vector EmulatedController::GetMappedDevices( 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); } @@ -412,7 +414,8 @@ std::vector EmulatedController::GetMappedDevices( 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); + param.Get("port", 0) == param_.Get("port", 0) && + param.Get("pad", 0) == param_.Get("pad", 0); }); if (devices_it != devices.end()) { continue; @@ -421,6 +424,7 @@ std::vector EmulatedController::GetMappedDevices( 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; -- cgit v1.2.3