DolphinQt/Mapping: Clear and skip "Modifier" iterative input mappings when using

analog inputs.
This commit is contained in:
Jordan Woyak
2025-02-07 00:36:52 -06:00
parent 3189de6c7a
commit 66624abb12
4 changed files with 72 additions and 23 deletions

View File

@ -313,7 +313,16 @@ QGroupBox* MappingWidget::CreateControlsBox(const QString& name, ControllerEmu::
void MappingWidget::CreateControl(const ControllerEmu::Control* control, QFormLayout* layout,
bool indicator)
{
auto* const button = new MappingButton(this, control->control_ref.get());
// I know this check is terrible, but it's just UI code.
const bool is_modifier = control->name == "Modifier";
using ControlType = MappingButton::ControlType;
const auto control_type =
control->control_ref->IsInput() ?
(is_modifier ? ControlType::ModifierInput : ControlType::NormalInput) :
ControlType::Output;
auto* const button = new MappingButton(this, control->control_ref.get(), control_type);
if (control->control_ref->IsInput())
{