summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorGravatar Narr the Reg2023-05-08 11:17:27 -0600
committerGravatar Narr the Reg2023-05-08 12:06:38 -0600
commit97bd6d641811cafc3ec99879fa53beda1a2334b5 (patch)
treeec3946ddaa935829006ceb2b46995fe493621dba /src/core/hid/emulated_controller.cpp
parentMerge pull request #10075 from Kelebek1/silence_nifm_spam (diff)
downloadyuzu-97bd6d641811cafc3ec99879fa53beda1a2334b5.tar.gz
yuzu-97bd6d641811cafc3ec99879fa53beda1a2334b5.tar.xz
yuzu-97bd6d641811cafc3ec99879fa53beda1a2334b5.zip
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
688 ReloadInput(); 688 ReloadInput();
689} 689}
690 690
691void EmulatedController::StartMotionCalibration() {
692 for (ControllerMotionInfo& motion : controller.motion_values) {
693 motion.emulated.Calibrate();
694 }
695}
696
691void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, 697void 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()) {