diff options
author | german77 <juangerman-13@hotmail.com> | 2023-03-05 19:44:39 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-03-05 19:50:15 +0100 |
commit | 97704b8da9866a4e529515f5793309ce5f199840 (patch) | |
tree | 7bc99ea037a05cce9342866378eca6ce8deecf0f /src/input_common/helpers/joycon_protocol/poller.h | |
parent | Merge pull request #9786 from FernandoS27/the-gaia-is-a-lie (diff) | |
download | yuzu-97704b8da9866a4e529515f5793309ce5f199840.tar yuzu-97704b8da9866a4e529515f5793309ce5f199840.tar.gz yuzu-97704b8da9866a4e529515f5793309ce5f199840.tar.bz2 yuzu-97704b8da9866a4e529515f5793309ce5f199840.tar.lz yuzu-97704b8da9866a4e529515f5793309ce5f199840.tar.xz yuzu-97704b8da9866a4e529515f5793309ce5f199840.tar.zst yuzu-97704b8da9866a4e529515f5793309ce5f199840.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/helpers/joycon_protocol/poller.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/input_common/helpers/joycon_protocol/poller.h b/src/input_common/helpers/joycon_protocol/poller.h index 354d41dad..5c897f070 100644 --- a/src/input_common/helpers/joycon_protocol/poller.h +++ b/src/input_common/helpers/joycon_protocol/poller.h @@ -22,7 +22,7 @@ public: JoyStickCalibration right_stick_calibration_, MotionCalibration motion_calibration_); - void SetCallbacks(const Joycon::JoyconCallbacks& callbacks_); + void SetCallbacks(const JoyconCallbacks& callbacks_); /// Handles data from passive packages void ReadPassiveMode(std::span<u8> buffer); @@ -51,7 +51,10 @@ private: void UpdatePasiveProPadInput(const InputReportPassive& buffer); /// Returns a calibrated joystick axis from raw axis data - f32 GetAxisValue(u16 raw_value, Joycon::JoyStickAxisCalibration calibration) const; + f32 GetAxisValue(u16 raw_value, JoyStickAxisCalibration calibration) const; + + /// Returns a digital joystick axis from passive axis data + std::pair<f32, f32> GetPassiveAxisValue(PasivePadStick raw_value) const; /// Returns a calibrated accelerometer axis from raw motion data f32 GetAccelerometerValue(s16 raw, const MotionSensorCalibration& cal, @@ -75,7 +78,7 @@ private: JoyStickCalibration right_stick_calibration{}; MotionCalibration motion_calibration{}; - Joycon::JoyconCallbacks callbacks{}; + JoyconCallbacks callbacks{}; }; } // namespace InputCommon::Joycon |