diff options
| author | 2023-05-05 12:29:26 -0600 | |
|---|---|---|
| committer | 2023-05-05 13:53:38 -0600 | |
| commit | 46e835f2d6531baea061a2723d171a2f5a1abf6a (patch) | |
| tree | dab41bff4babe44fd5850c6f5042090d7179bf82 /src/core/hid/emulated_controller.cpp | |
| parent | Merge pull request #10153 from FernandoS27/a-quickie-fixie (diff) | |
| download | yuzu-46e835f2d6531baea061a2723d171a2f5a1abf6a.tar.gz yuzu-46e835f2d6531baea061a2723d171a2f5a1abf6a.tar.xz yuzu-46e835f2d6531baea061a2723d171a2f5a1abf6a.zip | |
yuzu: Add motion preview to controller input
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
| -rw-r--r-- | src/core/hid/emulated_controller.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index a70f8807c..a5c2e3db8 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp | |||
| @@ -376,6 +376,7 @@ void EmulatedController::ReloadInput() { | |||
| 376 | motion.accel = emulated_motion.GetAcceleration(); | 376 | motion.accel = emulated_motion.GetAcceleration(); |
| 377 | motion.gyro = emulated_motion.GetGyroscope(); | 377 | motion.gyro = emulated_motion.GetGyroscope(); |
| 378 | motion.rotation = emulated_motion.GetRotations(); | 378 | motion.rotation = emulated_motion.GetRotations(); |
| 379 | motion.euler = emulated_motion.GetEulerAngles(); | ||
| 379 | motion.orientation = emulated_motion.GetOrientation(); | 380 | motion.orientation = emulated_motion.GetOrientation(); |
| 380 | motion.is_at_rest = !emulated_motion.IsMoving(motion_sensitivity); | 381 | motion.is_at_rest = !emulated_motion.IsMoving(motion_sensitivity); |
| 381 | } | 382 | } |
| @@ -976,14 +977,11 @@ void EmulatedController::SetMotion(const Common::Input::CallbackStatus& callback | |||
| 976 | emulated.UpdateOrientation(raw_status.delta_timestamp); | 977 | emulated.UpdateOrientation(raw_status.delta_timestamp); |
| 977 | force_update_motion = raw_status.force_update; | 978 | force_update_motion = raw_status.force_update; |
| 978 | 979 | ||
| 979 | if (is_configuring) { | ||
| 980 | return; | ||
| 981 | } | ||
| 982 | |||
| 983 | auto& motion = controller.motion_state[index]; | 980 | auto& motion = controller.motion_state[index]; |
| 984 | motion.accel = emulated.GetAcceleration(); | 981 | motion.accel = emulated.GetAcceleration(); |
| 985 | motion.gyro = emulated.GetGyroscope(); | 982 | motion.gyro = emulated.GetGyroscope(); |
| 986 | motion.rotation = emulated.GetRotations(); | 983 | motion.rotation = emulated.GetRotations(); |
| 984 | motion.euler = emulated.GetEulerAngles(); | ||
| 987 | motion.orientation = emulated.GetOrientation(); | 985 | motion.orientation = emulated.GetOrientation(); |
| 988 | motion.is_at_rest = !emulated.IsMoving(motion_sensitivity); | 986 | motion.is_at_rest = !emulated.IsMoving(motion_sensitivity); |
| 989 | } | 987 | } |