diff options
Diffstat (limited to 'Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp index 1e968c2ed2..257b9008c5 100644 --- a/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp +++ b/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp @@ -85,7 +85,8 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con group->type == ControllerEmu::GroupType::Stick || group->type == ControllerEmu::GroupType::Tilt || group->type == ControllerEmu::GroupType::MixedTriggers || - group->type == ControllerEmu::GroupType::Force; + group->type == ControllerEmu::GroupType::Force || + group->type == ControllerEmu::GroupType::Shake; const bool need_calibration = group->type == ControllerEmu::GroupType::Cursor || group->type == ControllerEmu::GroupType::Stick || @@ -129,7 +130,19 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con if (need_indicator) { - auto const indicator = new MappingIndicator(group); + MappingIndicator* indicator; + + switch (group->type) + { + case ControllerEmu::GroupType::Shake: + indicator = new ShakeMappingIndicator(static_cast<ControllerEmu::Shake*>(group)); + break; + + default: + indicator = new MappingIndicator(group); + break; + } + connect(this, &MappingWidget::Update, indicator, QOverload<>::of(&MappingIndicator::update)); if (need_calibration) |
