diff options
| author | 2023-05-09 09:47:29 -0400 | |
|---|---|---|
| committer | 2023-05-09 09:47:29 -0400 | |
| commit | 5890b96ce5d17e3702805ebfc1601a45295c94d0 (patch) | |
| tree | db8ea76449236b9899e05b34f68000e4c603e64a /src/core/hid/emulated_controller.cpp | |
| parent | Merge pull request #10206 from FernandoS27/astc-3d (diff) | |
| parent | yuzu: Make 3d cube with joycon shape (diff) | |
| download | yuzu-5890b96ce5d17e3702805ebfc1601a45295c94d0.tar.gz yuzu-5890b96ce5d17e3702805ebfc1601a45295c94d0.tar.xz yuzu-5890b96ce5d17e3702805ebfc1601a45295c94d0.zip | |
Merge pull request #10203 from german77/calibration
core: hid: Allow to calibrate gyro sensor
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
| -rw-r--r-- | src/core/hid/emulated_controller.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index c7f0af71f..366880711 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp | |||
| @@ -688,6 +688,12 @@ void EmulatedController::SetMotionParam(std::size_t index, Common::ParamPackage | |||
| 688 | ReloadInput(); | 688 | ReloadInput(); |
| 689 | } | 689 | } |
| 690 | 690 | ||
| 691 | void EmulatedController::StartMotionCalibration() { | ||
| 692 | for (ControllerMotionInfo& motion : controller.motion_values) { | ||
| 693 | motion.emulated.Calibrate(); | ||
| 694 | } | ||
| 695 | } | ||
| 696 | |||
| 691 | void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, | 697 | void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, |
| 692 | Common::UUID uuid) { | 698 | Common::UUID uuid) { |
| 693 | if (index >= controller.button_values.size()) { | 699 | if (index >= controller.button_values.size()) { |