diff options
Diffstat (limited to 'src/input_common/helpers/joycon_driver.h')
| -rw-r--r-- | src/input_common/helpers/joycon_driver.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index dc5d60221..c9118ee93 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h | |||
| @@ -8,14 +8,15 @@ | |||
| 8 | #include <span> | 8 | #include <span> |
| 9 | #include <thread> | 9 | #include <thread> |
| 10 | 10 | ||
| 11 | #include "input_common/helpers/joycon_protocol/calibration.h" | ||
| 12 | #include "input_common/helpers/joycon_protocol/generic_functions.h" | ||
| 13 | #include "input_common/helpers/joycon_protocol/joycon_types.h" | 11 | #include "input_common/helpers/joycon_protocol/joycon_types.h" |
| 14 | #include "input_common/helpers/joycon_protocol/poller.h" | ||
| 15 | #include "input_common/helpers/joycon_protocol/ringcon.h" | ||
| 16 | #include "input_common/helpers/joycon_protocol/rumble.h" | ||
| 17 | 12 | ||
| 18 | namespace InputCommon::Joycon { | 13 | namespace InputCommon::Joycon { |
| 14 | class CalibrationProtocol; | ||
| 15 | class GenericProtocol; | ||
| 16 | class NfcProtocol; | ||
| 17 | class JoyconPoller; | ||
| 18 | class RingConProtocol; | ||
| 19 | class RumbleProtocol; | ||
| 19 | 20 | ||
| 20 | class JoyconDriver final { | 21 | class JoyconDriver final { |
| 21 | public: | 22 | public: |
| @@ -84,17 +85,18 @@ private: | |||
| 84 | SupportedFeatures GetSupportedFeatures(); | 85 | SupportedFeatures GetSupportedFeatures(); |
| 85 | 86 | ||
| 86 | // Protocol Features | 87 | // Protocol Features |
| 87 | std::unique_ptr<CalibrationProtocol> calibration_protocol = nullptr; | 88 | std::unique_ptr<CalibrationProtocol> calibration_protocol; |
| 88 | std::unique_ptr<GenericProtocol> generic_protocol = nullptr; | 89 | std::unique_ptr<GenericProtocol> generic_protocol; |
| 89 | std::unique_ptr<JoyconPoller> joycon_poller = nullptr; | 90 | std::unique_ptr<NfcProtocol> nfc_protocol; |
| 90 | std::unique_ptr<RingConProtocol> ring_protocol = nullptr; | 91 | std::unique_ptr<JoyconPoller> joycon_poller; |
| 91 | std::unique_ptr<RumbleProtocol> rumble_protocol = nullptr; | 92 | std::unique_ptr<RingConProtocol> ring_protocol; |
| 93 | std::unique_ptr<RumbleProtocol> rumble_protocol; | ||
| 92 | 94 | ||
| 93 | // Connection status | 95 | // Connection status |
| 94 | bool is_connected{}; | 96 | bool is_connected{}; |
| 95 | u64 delta_time; | 97 | u64 delta_time; |
| 96 | std::size_t error_counter{}; | 98 | std::size_t error_counter{}; |
| 97 | std::shared_ptr<JoyconHandle> hidapi_handle = nullptr; | 99 | std::shared_ptr<JoyconHandle> hidapi_handle; |
| 98 | std::chrono::time_point<std::chrono::steady_clock> last_update; | 100 | std::chrono::time_point<std::chrono::steady_clock> last_update; |
| 99 | 101 | ||
| 100 | // External device status | 102 | // External device status |