From ce126f1cfee542d0963466a9d0266dc13e49a1ea Mon Sep 17 00:00:00 2001 From: spycrab Date: Tue, 19 Jun 2018 10:47:18 +0200 Subject: [PATCH] Qt/Mapping: Remove "Iterative Input" everywhere --- .../Core/DolphinQt2/Config/Mapping/GCKeyboardEmu.cpp | 6 ------ Source/Core/DolphinQt2/Config/Mapping/GCPadEmu.cpp | 11 ++++++++--- .../DolphinQt2/Config/Mapping/WiimoteEmuGeneral.cpp | 10 ++++++++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCKeyboardEmu.cpp b/Source/Core/DolphinQt2/Config/Mapping/GCKeyboardEmu.cpp index 70960d9269..e198936dd5 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCKeyboardEmu.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/GCKeyboardEmu.cpp @@ -35,14 +35,8 @@ void GCKeyboardEmu::CreateMainLayout() CreateGroupBox(QStringLiteral(""), Keyboard::GetGroup(GetPort(), KeyboardGroup::Kb4x))); auto* vbox_layout = new QVBoxLayout(); - auto* options_box = - CreateGroupBox(tr("Options"), Keyboard::GetGroup(GetPort(), KeyboardGroup::Options)); - - options_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - vbox_layout->addWidget( CreateGroupBox(QStringLiteral(""), Keyboard::GetGroup(GetPort(), KeyboardGroup::Kb5x))); - vbox_layout->addWidget(options_box); m_main_layout->addLayout(vbox_layout); diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadEmu.cpp b/Source/Core/DolphinQt2/Config/Mapping/GCPadEmu.cpp index 61733f7d34..e041034a21 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadEmu.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadEmu.cpp @@ -13,6 +13,7 @@ #include "Core/HW/GCPadEmu.h" #include "InputCommon/ControllerEmu/Setting/BooleanSetting.h" +#include "InputCommon/ControllerEmu/Setting/NumericSetting.h" #include "InputCommon/InputConfig.h" GCPadEmu::GCPadEmu(MappingWindow* window) : MappingWidget(window) @@ -43,10 +44,14 @@ void GCPadEmu::CreateMainLayout() // TODO: Get rid of this garbage once wx is removed // Remove "Iterative Input" auto* options_group = Pad::GetGroup(GetPort(), PadGroup::Options); - auto& bools = options_group->boolean_settings; - bools.erase(bools.end() - 1); - hbox_layout->addWidget(CreateGroupBox(tr("Options"), options_group)); + auto& bools = options_group->boolean_settings; + + if (bools.size() > 1 || !options_group->numeric_settings.empty()) + { + bools.pop_back(); + hbox_layout->addWidget(CreateGroupBox(tr("Options"), options_group)); + } setLayout(m_main_layout); } diff --git a/Source/Core/DolphinQt2/Config/Mapping/WiimoteEmuGeneral.cpp b/Source/Core/DolphinQt2/Config/Mapping/WiimoteEmuGeneral.cpp index 34e142c344..9d0dcea2dd 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/WiimoteEmuGeneral.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/WiimoteEmuGeneral.cpp @@ -16,6 +16,7 @@ #include "DolphinQt2/Config/Mapping/WiimoteEmuExtension.h" #include "InputCommon/ControllerEmu/ControlGroup/Extension.h" +#include "InputCommon/ControllerEmu/Setting/BooleanSetting.h" #include "InputCommon/InputConfig.h" WiimoteEmuGeneral::WiimoteEmuGeneral(MappingWindow* window, WiimoteEmuExtension* extension) @@ -56,8 +57,13 @@ void WiimoteEmuGeneral::CreateMainLayout() vbox_layout->addWidget(extension); vbox_layout->addWidget(CreateGroupBox( tr("Rumble"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Rumble))); - vbox_layout->addWidget(CreateGroupBox( - tr("Options"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Options))); + + // TODO: Get rid of this garbage once wx is removed + // Remove "Iterative Input" + auto* options_group = Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Options); + options_group->boolean_settings.pop_back(); + + vbox_layout->addWidget(CreateGroupBox(tr("Options"), options_group)); m_main_layout->addLayout(vbox_layout);