summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-05-07 05:09:55 +0200
committerGitHub <noreply@github.com>2023-05-07 05:09:55 +0200
commit9c9b4616c3eda641f3d370758587fa776fa1a87e (patch)
treed081194e1ea0b673a1cc01f7c00846374da70594 /src/core/hid/emulated_controller.cpp
parentMerge pull request #10178 from ronikirla/2-hour-crash (diff)
parentinput_common: Add property to invert an axis button (diff)
downloadyuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.tar
yuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.tar.gz
yuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.tar.bz2
yuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.tar.lz
yuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.tar.xz
yuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.tar.zst
yuzu-9c9b4616c3eda641f3d370758587fa776fa1a87e.zip
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index db71f1c19..ecab85893 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -376,6 +376,7 @@ void EmulatedController::ReloadInput() {
motion.accel = emulated_motion.GetAcceleration();
motion.gyro = emulated_motion.GetGyroscope();
motion.rotation = emulated_motion.GetRotations();
+ motion.euler = emulated_motion.GetEulerAngles();
motion.orientation = emulated_motion.GetOrientation();
motion.is_at_rest = !emulated_motion.IsMoving(motion_sensitivity);
}
@@ -980,14 +981,11 @@ void EmulatedController::SetMotion(const Common::Input::CallbackStatus& callback
emulated.UpdateOrientation(raw_status.delta_timestamp);
force_update_motion = raw_status.force_update;
- if (is_configuring) {
- return;
- }
-
auto& motion = controller.motion_state[index];
motion.accel = emulated.GetAcceleration();
motion.gyro = emulated.GetGyroscope();
motion.rotation = emulated.GetRotations();
+ motion.euler = emulated.GetEulerAngles();
motion.orientation = emulated.GetOrientation();
motion.is_at_rest = !emulated.IsMoving(motion_sensitivity);
}