DolphinQt: Add accelerometer/gyroscope mapping indicators.

This commit is contained in:
Jordan Woyak
2019-11-05 18:51:23 -06:00
parent 1e028025e5
commit 8ef25ddd84
3 changed files with 248 additions and 0 deletions

View File

@ -67,6 +67,8 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
group->type == ControllerEmu::GroupType::Tilt ||
group->type == ControllerEmu::GroupType::MixedTriggers ||
group->type == ControllerEmu::GroupType::Force ||
group->type == ControllerEmu::GroupType::IMUAccelerometer ||
group->type == ControllerEmu::GroupType::IMUGyroscope ||
group->type == ControllerEmu::GroupType::Shake;
const bool need_calibration = group->type == ControllerEmu::GroupType::Cursor ||
@ -84,6 +86,15 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
indicator = new ShakeMappingIndicator(static_cast<ControllerEmu::Shake*>(group));
break;
case ControllerEmu::GroupType::IMUAccelerometer:
indicator =
new AccelerometerMappingIndicator(static_cast<ControllerEmu::IMUAccelerometer*>(group));
break;
case ControllerEmu::GroupType::IMUGyroscope:
indicator = new GyroMappingIndicator(static_cast<ControllerEmu::IMUGyroscope*>(group));
break;
default:
indicator = new MappingIndicator(group);
break;