diff options
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/poller.h')
-rw-r--r-- | src/input_common/helpers/joycon_protocol/poller.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/input_common/helpers/joycon_protocol/poller.h b/src/input_common/helpers/joycon_protocol/poller.h index 354d41dad..0fa72c6db 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); @@ -46,12 +46,15 @@ private: const MotionStatus& motion_status); void UpdateActiveProPadInput(const InputReportActive& input, const MotionStatus& motion_status); - void UpdatePasiveLeftPadInput(const InputReportPassive& buffer); - void UpdatePasiveRightPadInput(const InputReportPassive& buffer); - void UpdatePasiveProPadInput(const InputReportPassive& buffer); + void UpdatePassiveLeftPadInput(const InputReportPassive& buffer); + void UpdatePassiveRightPadInput(const InputReportPassive& buffer); + void UpdatePassiveProPadInput(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(PassivePadStick 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 |