From 2d4e59eb624dc8d15196aea853987f8d57166e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 20 Dec 2023 15:37:46 +0100 Subject: [PATCH] Control mapping UI: Fix bug where we warn about combo mappings unnecessarily for axis input --- UI/ControlMappingScreen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 31f26044d8..246e2007ad 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -423,7 +423,8 @@ void KeyMappingNewKeyDialog::axis(const AxisInput &axis) { InputMapping mapping(axis.deviceId, axis.axisId, 1); triggeredAxes_.insert(mapping); if (!g_Config.bAllowMappingCombos && !mapping_.mappings.empty()) { - comboMappingsNotEnabled_->SetVisibility(UI::V_VISIBLE); + if (mapping_.mappings.size() == 1 && mapping != mapping_.mappings[0]) + comboMappingsNotEnabled_->SetVisibility(UI::V_VISIBLE); } else if (!mapping_.mappings.contains(mapping)) { mapping_.mappings.push_back(mapping); RecreateViews(); @@ -432,7 +433,8 @@ void KeyMappingNewKeyDialog::axis(const AxisInput &axis) { InputMapping mapping(axis.deviceId, axis.axisId, -1); triggeredAxes_.insert(mapping); if (!g_Config.bAllowMappingCombos && !mapping_.mappings.empty()) { - comboMappingsNotEnabled_->SetVisibility(UI::V_VISIBLE); + if (mapping_.mappings.size() == 1 && mapping != mapping_.mappings[0]) + comboMappingsNotEnabled_->SetVisibility(UI::V_VISIBLE); } else if (!mapping_.mappings.contains(mapping)) { mapping_.mappings.push_back(mapping); RecreateViews();