summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2019-04-13 12:13:13 -0400
committerGitHub <noreply@github.com>2019-04-13 12:13:13 -0400
commita891115ea350528f1735dab54d05edc8b8fe77c6 (patch)
tree08257dd14877d4693d502dcf50e81a734e0cb043 /Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp
parent241166a1a5becb0a6a2af209e7f5ea2962d6a2dd (diff)
parentc89ddf8cba9c6b19d59e2db1896292797163c54c (diff)
Merge pull request #7952 from jordan-woyak/emu-shake-params
WiimoteEmu: Allow shake frequency and intensity to be configured.
Diffstat (limited to 'Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/Mapping/MappingWidget.cpp17
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)