diff options
author | Lioncash <mathew1800@gmail.com> | 2022-02-01 18:20:01 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2022-02-01 18:20:23 +0100 |
commit | 9ba6bab9208f9a84f1f415e20c6750f8219d5d28 (patch) | |
tree | 625e5f6e4faa0d01c292b97b2d1fc62ff2eda151 /src | |
parent | Merge pull request #7828 from lioncash/dep (diff) | |
download | yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.tar yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.tar.gz yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.tar.bz2 yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.tar.lz yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.tar.xz yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.tar.zst yuzu-9ba6bab9208f9a84f1f415e20c6750f8219d5d28.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 752504236..4fda84294 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -326,7 +326,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i connect(button, &QPushButton::clicked, [=, this] { HandleClick( button, button_id, - [=, this](Common::ParamPackage params) { + [=, this](const Common::ParamPackage& params) { emulated_controller->SetButtonParam(button_id, params); }, InputCommon::Polling::InputType::Button); @@ -392,7 +392,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i connect(button, &QPushButton::clicked, [=, this] { HandleClick( button, motion_id, - [=, this](Common::ParamPackage params) { + [=, this](const Common::ParamPackage& params) { emulated_controller->SetMotionParam(motion_id, params); }, InputCommon::Polling::InputType::Motion); @@ -783,7 +783,7 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() { if (devices.size() == 1) { const auto devices_it = std::find_if( input_devices.begin(), input_devices.end(), - [first_engine, first_guid, first_port, first_pad](const Common::ParamPackage param) { + [first_engine, first_guid, first_port, first_pad](const Common::ParamPackage& param) { return param.Get("engine", "") == first_engine && param.Get("guid", "") == first_guid && param.Get("port", 0) == first_port && param.Get("pad", 0) == first_pad; @@ -814,7 +814,7 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() { if (is_engine_equal && is_port_equal) { const auto devices_it = std::find_if( input_devices.begin(), input_devices.end(), - [first_engine, first_guid, second_guid, first_port](const Common::ParamPackage param) { + [first_engine, first_guid, second_guid, first_port](const Common::ParamPackage& param) { const bool is_guid_valid = (param.Get("guid", "") == first_guid && param.Get("guid2", "") == second_guid) || @@ -1026,7 +1026,7 @@ int ConfigureInputPlayer::GetIndexFromControllerType(Core::HID::NpadStyleIndex t void ConfigureInputPlayer::UpdateInputDevices() { input_devices = input_subsystem->GetInputDevices(); ui->comboDevices->clear(); - for (auto device : input_devices) { + for (const auto& device : input_devices) { ui->comboDevices->addItem(QString::fromStdString(device.Get("display", "Unknown")), {}); } } @@ -1358,7 +1358,7 @@ bool ConfigureInputPlayer::IsInputAcceptable(const Common::ParamPackage& params) return params.Get("engine", "") == "keyboard" || params.Get("engine", "") == "mouse"; } - const auto current_input_device = input_devices[ui->comboDevices->currentIndex()]; + const auto& current_input_device = input_devices[ui->comboDevices->currentIndex()]; return params.Get("engine", "") == current_input_device.Get("engine", "") && (params.Get("guid", "") == current_input_device.Get("guid", "") || params.Get("guid", "") == current_input_device.Get("guid2", "")) && |