aboutsummaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-05-08 11:17:27 -0600
committerNarr the Reg <juangerman-13@hotmail.com>2023-05-08 12:06:38 -0600
commit97bd6d641811cafc3ec99879fa53beda1a2334b5 (patch)
treeec3946ddaa935829006ceb2b46995fe493621dba /src/core/hid/emulated_controller.cpp
parentb70a205a961effe644f2c9c48f8874e1c965276e (diff)
core: hid: Allow to calibrate gyro sensor
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp6
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
ReloadInput();
}
+void EmulatedController::StartMotionCalibration() {
+ for (ControllerMotionInfo& motion : controller.motion_values) {
+ motion.emulated.Calibrate();
+ }
+}
+
void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index,
Common::UUID uuid) {
if (index >= controller.button_values.size()) {