summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp8
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 9e5a40fe7..ed21f4b92 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -1553,6 +1553,7 @@ void ConfigureInputPlayer::LoadProfile() {
1553} 1553}
1554 1554
1555void ConfigureInputPlayer::SaveProfile() { 1555void ConfigureInputPlayer::SaveProfile() {
1556 static constexpr size_t HANDHELD_INDEX = 8;
1556 const QString profile_name = ui->comboProfiles->itemText(ui->comboProfiles->currentIndex()); 1557 const QString profile_name = ui->comboProfiles->itemText(ui->comboProfiles->currentIndex());
1557 1558
1558 if (profile_name.isEmpty()) { 1559 if (profile_name.isEmpty()) {
@@ -1561,7 +1562,12 @@ void ConfigureInputPlayer::SaveProfile() {
1561 1562
1562 ApplyConfiguration(); 1563 ApplyConfiguration();
1563 1564
1564 if (!profiles->SaveProfile(profile_name.toStdString(), player_index)) { 1565 // When we're in handheld mode, only the handheld emulated controller bindings are updated
1566 const bool is_handheld = player_index == 0 && emulated_controller->GetNpadIdType() ==
1567 Core::HID::NpadIdType::Handheld;
1568 const auto profile_player_index = is_handheld ? HANDHELD_INDEX : player_index;
1569
1570 if (!profiles->SaveProfile(profile_name.toStdString(), profile_player_index)) {
1565 QMessageBox::critical(this, tr("Save Input Profile"), 1571 QMessageBox::critical(this, tr("Save Input Profile"),
1566 tr("Failed to save the input profile \"%1\"").arg(profile_name)); 1572 tr("Failed to save the input profile \"%1\"").arg(profile_name));
1567 UpdateInputProfiles(); 1573 UpdateInputProfiles();