diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-02-26 14:39:13 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-26 14:39:13 -0600 |
commit | ff11fdb07e7264f21b45e23b852bc1c51c870f5c (patch) | |
tree | 0be3e8dfec5f9df92c38e3bba7b632751ad57379 /src/yuzu/configuration/configure_input_player.cpp | |
parent | 26c1edf2f083399a594a834bdd36be85369819f7 (diff) |
Revert "yuzu: config: Remove player 8 and 9 from config file"
Diffstat (limited to 'src/yuzu/configuration/configure_input_player.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 93eb10cebc..50b62293eb 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -1589,6 +1589,7 @@ void ConfigureInputPlayer::LoadProfile() { } void ConfigureInputPlayer::SaveProfile() { + static constexpr size_t HANDHELD_INDEX = 8; const QString profile_name = ui->comboProfiles->itemText(ui->comboProfiles->currentIndex()); if (profile_name.isEmpty()) { @@ -1597,7 +1598,12 @@ void ConfigureInputPlayer::SaveProfile() { ApplyConfiguration(); - if (!profiles->SaveProfile(profile_name.toStdString(), player_index)) { + // When we're in handheld mode, only the handheld emulated controller bindings are updated + const bool is_handheld = player_index == 0 && emulated_controller->GetNpadIdType() == + Core::HID::NpadIdType::Handheld; + const auto profile_player_index = is_handheld ? HANDHELD_INDEX : player_index; + + if (!profiles->SaveProfile(profile_name.toStdString(), profile_player_index)) { QMessageBox::critical(this, tr("Save Input Profile"), tr("Failed to save the input profile \"%1\"").arg(profile_name)); UpdateInputProfiles(); |