diff options
author | german77 <juangerman-13@hotmail.com> | 2022-05-21 23:48:05 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2022-05-27 17:21:10 +0200 |
commit | 390d49c5f17f12f98c80867915bb30991a40ea31 (patch) | |
tree | a061c6d1385f8b9555ab59b2fce37ba0ddf409f9 /src/core/hle/service/hid/controllers/npad.h | |
parent | service: hid: Implement MergeSingleJoyAsDualJoy according to RE (diff) | |
download | yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.tar yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.tar.gz yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.tar.bz2 yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.tar.lz yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.tar.xz yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.tar.zst yuzu-390d49c5f17f12f98c80867915bb30991a40ea31.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 5305e8cf8..dfb4de740 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -143,25 +143,25 @@ public: ResultCode DisconnectNpad(Core::HID::NpadIdType npad_id); - ResultCode SetGyroscopeZeroDriftMode(Core::HID::SixAxisSensorHandle sixaxis_handle, + ResultCode SetGyroscopeZeroDriftMode(const Core::HID::SixAxisSensorHandle& sixaxis_handle, GyroscopeZeroDriftMode drift_mode); - ResultCode GetGyroscopeZeroDriftMode(Core::HID::SixAxisSensorHandle sixaxis_handle, + ResultCode GetGyroscopeZeroDriftMode(const Core::HID::SixAxisSensorHandle& sixaxis_handle, GyroscopeZeroDriftMode& drift_mode) const; - ResultCode IsSixAxisSensorAtRest(Core::HID::SixAxisSensorHandle sixaxis_handle, + ResultCode IsSixAxisSensorAtRest(const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_at_rest) const; ResultCode IsFirmwareUpdateAvailableForSixAxisSensor( - Core::HID::SixAxisSensorHandle sixaxis_handle, bool& is_firmware_available) const; - ResultCode SetSixAxisEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle, + const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_firmware_available) const; + ResultCode SetSixAxisEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool sixaxis_status); - ResultCode IsSixAxisSensorFusionEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle, + ResultCode IsSixAxisSensorFusionEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_fusion_enabled) const; - ResultCode SetSixAxisFusionEnabled(Core::HID::SixAxisSensorHandle sixaxis_handle, + ResultCode SetSixAxisFusionEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool is_fusion_enabled); ResultCode SetSixAxisFusionParameters( - Core::HID::SixAxisSensorHandle sixaxis_handle, + const Core::HID::SixAxisSensorHandle& sixaxis_handle, Core::HID::SixAxisSensorFusionParameters sixaxis_fusion_parameters); ResultCode GetSixAxisFusionParameters( - Core::HID::SixAxisSensorHandle sixaxis_handle, + const Core::HID::SixAxisSensorHandle& sixaxis_handle, Core::HID::SixAxisSensorFusionParameters& parameters) const; ResultCode GetLedPattern(Core::HID::NpadIdType npad_id, Core::HID::LedPattern& pattern) const; ResultCode IsUnintendedHomeButtonInputProtectionEnabled(Core::HID::NpadIdType npad_id, @@ -493,6 +493,7 @@ private: SixaxisParameters sixaxis_dual_right{}; SixaxisParameters sixaxis_left{}; SixaxisParameters sixaxis_right{}; + SixaxisParameters sixaxis_unknown{}; // Current pad state NPadGenericState npad_pad_state{}; @@ -524,6 +525,10 @@ private: NpadControllerData& GetControllerFromNpadIdType(Core::HID::NpadIdType npad_id); const NpadControllerData& GetControllerFromNpadIdType(Core::HID::NpadIdType npad_id) const; + SixaxisParameters& GetSixaxisState(const Core::HID::SixAxisSensorHandle& device_handle); + const SixaxisParameters& GetSixaxisState( + const Core::HID::SixAxisSensorHandle& device_handle) const; + std::atomic<u64> press_state{}; std::array<NpadControllerData, NPAD_COUNT> controller_data{}; |