diff options
Diffstat (limited to 'src')
| -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 | |||
| 326 | connect(button, &QPushButton::clicked, [=, this] { | 326 | connect(button, &QPushButton::clicked, [=, this] { |
| 327 | HandleClick( | 327 | HandleClick( |
| 328 | button, button_id, | 328 | button, button_id, |
| 329 | [=, this](Common::ParamPackage params) { | 329 | [=, this](const Common::ParamPackage& params) { |
| 330 | emulated_controller->SetButtonParam(button_id, params); | 330 | emulated_controller->SetButtonParam(button_id, params); |
| 331 | }, | 331 | }, |
| 332 | InputCommon::Polling::InputType::Button); | 332 | InputCommon::Polling::InputType::Button); |
| @@ -392,7 +392,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 392 | connect(button, &QPushButton::clicked, [=, this] { | 392 | connect(button, &QPushButton::clicked, [=, this] { |
| 393 | HandleClick( | 393 | HandleClick( |
| 394 | button, motion_id, | 394 | button, motion_id, |
| 395 | [=, this](Common::ParamPackage params) { | 395 | [=, this](const Common::ParamPackage& params) { |
| 396 | emulated_controller->SetMotionParam(motion_id, params); | 396 | emulated_controller->SetMotionParam(motion_id, params); |
| 397 | }, | 397 | }, |
| 398 | InputCommon::Polling::InputType::Motion); | 398 | InputCommon::Polling::InputType::Motion); |
| @@ -783,7 +783,7 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() { | |||
| 783 | if (devices.size() == 1) { | 783 | if (devices.size() == 1) { |
| 784 | const auto devices_it = std::find_if( | 784 | const auto devices_it = std::find_if( |
| 785 | input_devices.begin(), input_devices.end(), | 785 | input_devices.begin(), input_devices.end(), |
| 786 | [first_engine, first_guid, first_port, first_pad](const Common::ParamPackage param) { | 786 | [first_engine, first_guid, first_port, first_pad](const Common::ParamPackage& param) { |
| 787 | return param.Get("engine", "") == first_engine && | 787 | return param.Get("engine", "") == first_engine && |
| 788 | param.Get("guid", "") == first_guid && param.Get("port", 0) == first_port && | 788 | param.Get("guid", "") == first_guid && param.Get("port", 0) == first_port && |
| 789 | param.Get("pad", 0) == first_pad; | 789 | param.Get("pad", 0) == first_pad; |
| @@ -814,7 +814,7 @@ void ConfigureInputPlayer::UpdateInputDeviceCombobox() { | |||
| 814 | if (is_engine_equal && is_port_equal) { | 814 | if (is_engine_equal && is_port_equal) { |
| 815 | const auto devices_it = std::find_if( | 815 | const auto devices_it = std::find_if( |
| 816 | input_devices.begin(), input_devices.end(), | 816 | input_devices.begin(), input_devices.end(), |
| 817 | [first_engine, first_guid, second_guid, first_port](const Common::ParamPackage param) { | 817 | [first_engine, first_guid, second_guid, first_port](const Common::ParamPackage& param) { |
| 818 | const bool is_guid_valid = | 818 | const bool is_guid_valid = |
| 819 | (param.Get("guid", "") == first_guid && | 819 | (param.Get("guid", "") == first_guid && |
| 820 | param.Get("guid2", "") == second_guid) || | 820 | param.Get("guid2", "") == second_guid) || |
| @@ -1026,7 +1026,7 @@ int ConfigureInputPlayer::GetIndexFromControllerType(Core::HID::NpadStyleIndex t | |||
| 1026 | void ConfigureInputPlayer::UpdateInputDevices() { | 1026 | void ConfigureInputPlayer::UpdateInputDevices() { |
| 1027 | input_devices = input_subsystem->GetInputDevices(); | 1027 | input_devices = input_subsystem->GetInputDevices(); |
| 1028 | ui->comboDevices->clear(); | 1028 | ui->comboDevices->clear(); |
| 1029 | for (auto device : input_devices) { | 1029 | for (const auto& device : input_devices) { |
| 1030 | ui->comboDevices->addItem(QString::fromStdString(device.Get("display", "Unknown")), {}); | 1030 | ui->comboDevices->addItem(QString::fromStdString(device.Get("display", "Unknown")), {}); |
| 1031 | } | 1031 | } |
| 1032 | } | 1032 | } |
| @@ -1358,7 +1358,7 @@ bool ConfigureInputPlayer::IsInputAcceptable(const Common::ParamPackage& params) | |||
| 1358 | return params.Get("engine", "") == "keyboard" || params.Get("engine", "") == "mouse"; | 1358 | return params.Get("engine", "") == "keyboard" || params.Get("engine", "") == "mouse"; |
| 1359 | } | 1359 | } |
| 1360 | 1360 | ||
| 1361 | const auto current_input_device = input_devices[ui->comboDevices->currentIndex()]; | 1361 | const auto& current_input_device = input_devices[ui->comboDevices->currentIndex()]; |
| 1362 | return params.Get("engine", "") == current_input_device.Get("engine", "") && | 1362 | return params.Get("engine", "") == current_input_device.Get("engine", "") && |
| 1363 | (params.Get("guid", "") == current_input_device.Get("guid", "") || | 1363 | (params.Get("guid", "") == current_input_device.Get("guid", "") || |
| 1364 | params.Get("guid", "") == current_input_device.Get("guid2", "")) && | 1364 | params.Get("guid", "") == current_input_device.Get("guid2", "")) && |